Hide navigation sidebar
Hide table of contents sidebar
Skip to content
Back to top
View this page
Toggle table of contents sidebar

# betty.config package

## Subpackages

- betty.config.collections package
  - Submodules
    - betty.config.collections.mapping module
      - `ConfigurationMapping`
        - `ConfigurationMapping.__init__()`
        - `ConfigurationMapping.append()`
        - `ConfigurationMapping.dump()`
        - `ConfigurationMapping.insert()`
        - `ConfigurationMapping.keys()`
        - `ConfigurationMapping.load()`
        - `ConfigurationMapping.move_to_beginning()`
        - `ConfigurationMapping.move_to_end()`
        - `ConfigurationMapping.move_towards_beginning()`
        - `ConfigurationMapping.move_towards_end()`
        - `ConfigurationMapping.prepend()`
        - `ConfigurationMapping.replace()`
        - `ConfigurationMapping.to_index()`
        - `ConfigurationMapping.to_key()`
        - `ConfigurationMapping.update()`
        - `ConfigurationMapping.values()`
    - betty.config.collections.sequence module
      - `ConfigurationSequence`
        - `ConfigurationSequence.__init__()`
        - `ConfigurationSequence.append()`
        - `ConfigurationSequence.dump()`
        - `ConfigurationSequence.insert()`
        - `ConfigurationSequence.keys()`
        - `ConfigurationSequence.load()`
        - `ConfigurationSequence.move_to_beginning()`
        - `ConfigurationSequence.move_to_end()`
        - `ConfigurationSequence.move_towards_beginning()`
        - `ConfigurationSequence.move_towards_end()`
        - `ConfigurationSequence.prepend()`
        - `ConfigurationSequence.replace()`
        - `ConfigurationSequence.to_index()`
        - `ConfigurationSequence.to_key()`
        - `ConfigurationSequence.update()`
        - `ConfigurationSequence.values()`
  - Module contents
    - `ConfigurationCollection`
      - `ConfigurationCollection.__init__()`
      - `ConfigurationCollection.append()`
      - `ConfigurationCollection.clear()`
      - `ConfigurationCollection.insert()`
      - `ConfigurationCollection.keys()`
      - `ConfigurationCollection.load_item()`
      - `ConfigurationCollection.move_to_beginning()`
      - `ConfigurationCollection.move_to_end()`
      - `ConfigurationCollection.move_towards_beginning()`
      - `ConfigurationCollection.move_towards_end()`
      - `ConfigurationCollection.prepend()`
      - `ConfigurationCollection.remove()`
      - `ConfigurationCollection.replace()`
      - `ConfigurationCollection.to_index()`
      - `ConfigurationCollection.to_indices()`
      - `ConfigurationCollection.to_key()`
      - `ConfigurationCollection.to_keys()`
      - `ConfigurationCollection.values()`

## Module contents

The Configuration API.

class betty.config.Configurable

  Bases: `Generic`[`_ConfigurationT`]

  Any configurable object.

  __init__(*args: Any, **kwargs: Any)
  property configuration: _ConfigurationT

    The object’s configuration.

class betty.config.Configuration

  Bases: `Dumpable`

  Any configuration object.

  __init__(*args: Any, **kwargs: Any)
  abstract load(dump: bool | int | float | str | None | MutableSequence[Dump] | MutableMapping[str, Dump]) → None

    Load dumped configuration.

    Raises:

      betty.assertion.error.AssertionFailed – Raised if the dump contains invalid configuration.

  abstract update(other: Self) → None

    Update this configuration with the values from `other`.

betty.config.assert_configuration_file(configuration: _ConfigurationT) → AssertionChain[Path, _ConfigurationT]

  Assert that configuration can be loaded from a file.

async betty.config.write_configuration_file(configuration: Configuration, configuration_file_path: Path) → None

  Write configuration to file.