Configloader Configloader

class dffml.configloader.configloader.BaseConfigLoader(config: Optional[Type[BaseConfig]])[source]
async classmethod load_single_file(parsers: Dict[str, BaseConfigLoader], exit_stack: AsyncExitStack, path: Path, *, base_dir: Optional[Path] = None) Dict[source]

Load one file and load the ConfigLoader for it if necessary, using the AsyncExitStack provided.

class dffml.configloader.configloader.BaseConfigLoaderContext(parent: BaseConfigLoader)[source]
abstract async dumpb(resource: Dict) bytes[source]

ConfigLoaders need to be serialize a dict representation of the resources they are asked to dump.

abstract async loadb(resource: bytes) Dict[source]

ConfigLoaders need to be able to return the dict representation of the resources they are asked to load.

class dffml.configloader.configloader.ConfigLoaders(*args, **kwargs)[source]

A class similar to Sources in that it will hold all the config loaders that get loaded as needed (based on filetype).

SINGLETON

alias of BaseConfigLoader