betty.config.collections.mapping module - Betty documentation

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

# betty.config.collections.mapping module

Define and provide key-value mappings of `betty.config.Configuration` instances.

class betty.config.collections.mapping.ConfigurationMapping

  Bases: `_ConfigurationMapping`[`_ConfigurationKeyT`, `_ConfigurationT`], `Generic`[`_ConfigurationKeyT`, `_ConfigurationT`]

  A key-value mapping where values are `betty.config.Configuration`.

  To test your own subclasses, use `betty.test_utils.config.collections.mapping.ConfigurationMappingTestBase`.

  dump() → bool | int | float | str | None | MutableSequence[bool | int | float | str | None | MutableSequence[Dump] | MutableMapping[str, Dump]] | MutableMapping[str, bool | int | float | str | None | MutableSequence[Dump] | MutableMapping[str, Dump]] | type[Void]

    Dump this instance to a portable format.

  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.

class betty.config.collections.mapping.OrderedConfigurationMapping

  Bases: `_ConfigurationMapping`[`_ConfigurationKeyT`, `_ConfigurationT`], `Generic`[`_ConfigurationKeyT`, `_ConfigurationT`]

  An ordered key-value mapping where values are `betty.config.Configuration`.

  To test your own subclasses, use `betty.test_utils.config.collections.mapping.OrderedConfigurationMappingTestBase`.

  dump() → bool | int | float | str | None | MutableSequence[bool | int | float | str | None | MutableSequence[Dump] | MutableMapping[str, Dump]] | MutableMapping[str, bool | int | float | str | None | MutableSequence[Dump] | MutableMapping[str, Dump]] | type[Void]

    Dump this instance to a portable format.

  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.