Processor
Processor¶
- class Processor[source]¶
Bases:
Generic
[configpile.processor._Config
]Configuration processor
Attributes
Note: attributes inherited from parent classes are not shown here, if any
Configuration to parse
Completed argument parser, used only for documentation purposes (CLI and Sphinx)
Environment variable handlers
INI file processor
Command line arguments handler
Dictionary of parameters by field name
Methods
Creates the processor corresponding to a configuration
Processes command-line arguments (deprecated)
Processes command-line arguments, configuration files and environment variables
Returns a sequence of the arguments present in a configuration, with updated data
Processes the configuration in INI format contained in a string
Processes the configuration contained in an INI file
List of members of Processor
- config_type: Type[configpile.processor._Config]¶
Configuration to parse
- argument_parser: argparse.ArgumentParser¶
Completed argument parser, used only for documentation purposes (CLI and Sphinx)
- env_handlers: Mapping[str, configpile.handlers.KVHandler]¶
Environment variable handlers
- ini_processor: configpile.processor.IniProcessor¶
INI file processor
- cl_handler: configpile.handlers.CLStdHandler¶
Command line arguments handler
- params_by_name: Mapping[str, configpile.arg.Param[Any]]¶
Dictionary of parameters by field name
- validators: Sequence[Callable[[configpile.processor._Config], Optional[configpile.userr.Err]]]¶
- static process_fields(config_type)[source]¶
Returns a sequence of the arguments present in a configuration, with updated data
- process_ini_contents(ini_contents)[source]¶
Processes the configuration in INI format contained in a string
- process(cwd, args, env)[source]¶
Processes command-line arguments (deprecated)
See also:
process_command_line()
- Return type
Union
[TypeVar
(_Config
, bound=Config
),SpecialAction
,Err
]
- process_command_line(cwd, args, env)[source]¶
Processes command-line arguments, configuration files and environment variables
- Parameters
- Return type
Union
[TypeVar
(_Config
, bound=Config
),SpecialAction
,Err
]- Returns
Either a parsed configuration, a special action to execute, or (a list of) errors
- __init__(config_type, argument_parser, env_handlers, ini_processor, cl_handler, params_by_name, validators)¶
- static __new__(cls, *args, **kwds)¶