betty.config.collections package¶
Submodules¶
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.Configuration
values.To test your own subclasses, use
betty.test_utils.config.collections.ConfigurationCollectionTestBase
.- 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 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.