betty.config.collections package¶
Submodules¶
- betty.config.collections.mapping module
ConfigurationMappingConfigurationMapping.__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
ConfigurationSequenceConfigurationSequence.__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¶
Define and provide collections of betty.config.Configuration instances.
- class betty.config.collections.ConfigurationCollection[source]¶
Bases:
Configuration,Generic[_ConfigurationKeyT,_ConfigurationT]Any collection of
betty.config.Configurationvalues.- abstract append(*configurations: _ConfigurationT) None[source]¶
Append the given values to the end of the sequence.
- abstract insert(index: int, *configurations: _ConfigurationT) None[source]¶
Insert the given values at the given index.
- abstract load_item(dump: Dump) _ConfigurationT[source]¶
Create and load a new item from the given dump, or raise an assertion error.
- Raises:
betty.assertion.error.AssertionFailed – Raised when the dump is invalid and cannot be loaded.
- abstract move_to_beginning(*configuration_keys: _ConfigurationKeyT) None[source]¶
Move the given keys (and their values) to the beginning of the sequence.
- abstract move_to_end(*configuration_keys: _ConfigurationKeyT) None[source]¶
Move the given keys (and their values) to the end of the sequence.
- abstract move_towards_beginning(*configuration_keys: _ConfigurationKeyT) None[source]¶
Move the given keys (and their values) one place towards the beginning of the sequence.
- abstract move_towards_end(*configuration_keys: _ConfigurationKeyT) None[source]¶
Move the given keys (and their values) one place towards the end of the sequence.
- abstract prepend(*configurations: _ConfigurationT) None[source]¶
Prepend the given values to the beginning of the sequence.
- remove(*configuration_keys: _ConfigurationKeyT) None[source]¶
Remove the given keys from the collection.
- abstract replace(*values: _ConfigurationT) None[source]¶
Replace any existing values with the given ones.
- abstract to_index(configuration_key: _ConfigurationKeyT) int[source]¶
Get the index for the given key.
- to_indices(*configuration_keys: _ConfigurationKeyT) Iterator[int][source]¶
Get the indices for the given keys.
- abstract to_key(index: int) _ConfigurationKeyT[source]¶
Get the key for the item at the given index.