Read/use config/pyproject.toml file (config) — pyproject2conda v0.8.0 documentation

Skip to main content
`Ctrl`+`K`

# Read/use config/pyproject.toml file (config)

# Read/use config/pyproject.toml file (`config`)

Classes:

`Config`(data) | Class to parse toml file with [tool.pyproject2conda] section

class pyproject2conda.config.Config(data)

  Bases: `object`

  Class to parse toml file with [tool.pyproject2conda] section

  Methods:

  `get_in`(*keys[, default]) | Utility to extract from nested dict.
  `channels`([env_name, inherit]) | Channels getter
  `python`([env_name, inherit, default]) | Python getter
  `extras`(env_name) | Extras getter
  `output`([env_name]) | Output getter
  `sort`([env_name, inherit, default]) | Sort getter
  `base`(env_name[, default]) | Base getter.
  `header`(env_name) | Header getter
  `style`([env_name, default]) | Style getter.
  `python_include`([env_name]) | Flag python_include
  `python_version`([env_name]) | Flag python_version
  `overwrite`([env_name, default]) | Flag overwrite
  `verbose`([env_name, default]) | Flag verbose
  `template`(env_name[, default]) | Flag for template
  `template_python`(env_name[, default]) | Flag for template_python.
  `user_config`([env_name]) | Flag user_config
  `assign_user_config`(user) | Assign user_config to self.
  `iter`([envs]) | Iterate over configs
  `from_toml_dict`(data[, user_config]) | Create from toml dictionaries.
  `from_string`(s[, user_config]) | Create from string representation of toml file.
  `from_file`(path[, user_config]) | Create from toml file(s).

  Attributes:

  `overrides` | All overrides sections from [[tool.pyproject2conda.overrides]]
  `envs` | All environments

  get_in(*keys, default=None)

    Utility to extract from nested dict.

  property overrides

    All overrides sections from [[tool.pyproject2conda.overrides]]

  property envs

    All environments

  channels(env_name=None, inherit=True)

    Channels getter

  python(env_name=None, inherit=True, default=<class 'list'>)

    Python getter

  extras(env_name)

    Extras getter

  output(env_name=None)

    Output getter

  sort(env_name=None, inherit=True, default=True)

    Sort getter

  base(env_name, default=True)

    Base getter.

  header(env_name)

    Header getter

  style(env_name=None, default='yaml')

    Style getter. One of yaml, requirements

  python_include(env_name=None)

    Flag python_include

  python_version(env_name=None)

    Flag python_version

  overwrite(env_name=None, default='check')

    Flag overwrite

  verbose(env_name=None, default=None)

    Flag verbose

  template(env_name, default='{env}')

    Flag for template

  template_python(env_name, default='py{py}-{env}')

    Flag for template_python.

  user_config(env_name=None)

    Flag user_config

  assign_user_config(user)

    Assign user_config to self.

  iter(envs=None, **defaults)

    Iterate over configs

  classmethod from_toml_dict(data, user_config=None)

    Create from toml dictionaries.

  classmethod from_string(s, user_config=None)

    Create from string representation of toml file.

  classmethod from_file(path, user_config='infer')

    Create from toml file(s).