invirtualenv.config module

Functions for handling the configuration settings

invirtualenv.config.cast_types(configuration, types_dict=None)

Update in place the configuration dictionary with inferred values if they aren’t specified.

Parameters:
  • configuration (dict) –
  • config_types (dict, optional) – Types dictionary, defaults to value from config_types()
invirtualenv.config.generate_parsed_config_file(source=None, dest=None)

Generate a conf file with the environment variables expanded

Parameters:
  • source (str, optional) – The path to the source file
  • dest (str, optional) – The path to the desired destination file
Returns:

Path to the generated config file

Return type:

str

invirtualenv.config.get_configuration(configuration=None)

Parse a configuration file

Parameters:configuration (str or list, optional) – A configuration file or list of configuration files to parse, defaults to the deploy_default.conf file in the package and deploy.conf in the current working directory.
Returns:The parsed configuration
Return type:configparser
invirtualenv.config.get_configuration_dict(configuration=None, value_types=None)

Parse the configuration files

Parameters:
  • configuration (str or list, optional) – A configuration file or list of configuration files to parse, defaults to the deploy_default.conf file in the package and deploy.conf in the current working directory.
  • value_types (dict, optional) – Dictionary containing classes to apply to specific items
Returns:

Configuration dictionary

Return type:

dict

invirtualenv.config.parse_arguments(configuration=None)

Parse the command line arguments

Parameters:configuration (list, optional) – A list of config files to parse, defaults to the packaged deploy_default.conf and the deploy.conf file in the current directory.
Returns:With the configuration based on the passed command line arguments and defaults from the deploy_default.conf file in the package.
Return type:argparse namespace object