anyconfig.backend.yaml.common¶
Common library for YAML backend modules.
- anyconfig.backend.yaml.common.filter_from_options(key, options)¶
Filter a key
keyin ``options.- Parameters:
key (
str) – Key str in optionsoptions (
dict[str,Any]) – Mapping object
- Return type:
dict[str,Any]- Returns:
New mapping object from ‘options’ in which the item with ‘key’ filtered
>>> filter_from_options("a", dict(a=1, b=2)) {'b': 2}
- class anyconfig.backend.yaml.common.Parser¶
Bases:
StreamParserParser for YAML files.
- _type: ClassVar[str] = 'yaml'¶
- _extensions: tuple[str, ...] = ('yaml', 'yml')¶
- _ordered: ClassVar[bool] = True¶
- _allow_primitives: ClassVar[bool] = True¶
- _dict_opts: tuple[str, ...] = ('ac_dict',)¶
- __annotations__ = {'_allow_primitives': 'typing.ClassVar[bool]', '_dict_opts': 'tuple[str, ...]', '_extensions': 'tuple[str, ...]', '_ordered': 'typing.ClassVar[bool]', '_type': 'typing.ClassVar[str]'}¶
- __module__ = 'anyconfig.backend.yaml.common'¶