datazen.environment.config
index
/home/vkottler/src/vkottler/workspace/datazen/datazen/environment/config.py

datazen - A child class for adding configuration-data loading capabilities to
          the environment dataset.

 
Modules
       
logging

 
Classes
       
datazen.environment.schema.SchemaEnvironment(datazen.environment.base.BaseEnvironment)
ConfigEnvironment(datazen.environment.variable.VariableEnvironment, datazen.environment.schema.SchemaEnvironment)
datazen.environment.variable.VariableEnvironment(datazen.environment.base.BaseEnvironment)
ConfigEnvironment(datazen.environment.variable.VariableEnvironment, datazen.environment.schema.SchemaEnvironment)

 
class ConfigEnvironment(datazen.environment.variable.VariableEnvironment, datazen.environment.schema.SchemaEnvironment)
    ConfigEnvironment(**kwargs) -> None
 
The configuration-data loading environment mixin, requires variable
loading to function.
 
 
Method resolution order:
ConfigEnvironment
datazen.environment.variable.VariableEnvironment
datazen.environment.schema.SchemaEnvironment
datazen.environment.base.BaseEnvironment
builtins.object

Methods defined here:
__init__(self, **kwargs) -> None
Extend the environment with a notion of configs being valid.
add_config_dirs(self, dir_paths: List[str], rel_path: str = '.', name: str = '__root__', allow_dup: bool = False) -> int
Add configuration-data directories, return the number of directories
added.
load_configs(self, cfg_loads: datazen.load.LoadedFiles = LoadedFiles(files=None, file_data=None), var_loads: datazen.load.LoadedFiles = LoadedFiles(files=None, file_data=None), sch_loads: datazen.load.LoadedFiles = LoadedFiles(files=None, file_data=None), sch_types_loads: datazen.load.LoadedFiles = LoadedFiles(files=None, file_data=None), name: str = '__root__', logger: logging.Logger = <Logger datazen.environment.config (WARNING)>, enforce_schemas: bool = True) -> vcorelib.io.types.LoadResult
Load configuration data, resolve any un-loaded configuration
directories.

Methods inherited from datazen.environment.variable.VariableEnvironment:
add_variable_dirs(self, dir_paths: List[str], rel_path: str = '.', name: str = '__root__', allow_dup: bool = False) -> int
Add variable-data directories, return the number of directories added.
load_variables(self, var_loads: datazen.load.LoadedFiles = LoadedFiles(files=None, file_data=None), name: str = '__root__') -> vcorelib.io.types.LoadResult
Load variable data, resolve any un-loaded variable directories.

Methods inherited from datazen.environment.schema.SchemaEnvironment:
add_schema_dirs(self, dir_paths: List[str], rel_path: str = '.', name: str = '__root__', allow_dup: bool = False) -> int
Add schema-data directories, return the number of directories added.
add_schema_type_dirs(self, dir_paths: List[str], rel_path: str = '.', name: str = '__root__', allow_dup: bool = False) -> int
Add directories containing schema-type data (to be registered at
runtime).
enforce_schemas(self, data: Dict[str, Any], require_all: bool = True, sch_loads: datazen.load.LoadedFiles = LoadedFiles(files=None, file_data=None), sch_types_loads: datazen.load.LoadedFiles = LoadedFiles(files=None, file_data=None), name: str = '__root__') -> bool
Perform schema-validation on provided data and return the boolean
result. Adds (and removes) namespaced types if applicable.
load_schema_types(self, sch_loads: datazen.load.LoadedFiles = LoadedFiles(files=None, file_data=None), name: str = '__root__') -> Dict[str, Any]
Load custom schema types and resolve any un-loaded directories.
load_schemas(self, require_all: bool = True, sch_loads: datazen.load.LoadedFiles = LoadedFiles(files=None, file_data=None), sch_types_loads: datazen.load.LoadedFiles = LoadedFiles(files=None, file_data=None), name: str = '__root__', modify_registry: bool = True) -> Dict[str, Any]
Load schema data, resolve any un-loaded schema directories.

Methods inherited from datazen.environment.base.BaseEnvironment:
add_dir(self, dir_type: datazen.enums.DataType, dir_path: str, rel_path: str = '.', name: str = '__root__', allow_dup: bool = False) -> bool
Proxy for add_dir for a namespace.
add_dirs(self, dir_type: datazen.enums.DataType, dir_paths: List[str], rel_path: str = '.', name: str = '__root__', allow_dup: bool = False) -> int
Proxy for add_dirs for a namespace.
add_namespace(self, name: str, clone_root: bool = True) -> None
Add a new namespace, optionally clone from the existing root.
get_data(self, dir_type: datazen.enums.DataType, name: str = '__root__') -> Dict[str, Any]
Get the raw data for a directory type from a namespace.
get_namespace(self, key_name: str, target: str, target_data: Dict[str, Any]) -> str
Determine the namespace that a target should use, in general they
all should be unique unless they don't load anything new.
get_to_load(self, dir_type: datazen.enums.DataType, name: str = '__root__') -> List[Union[pathlib.Path, str, NoneType]]
Proxy for a namespace's get_to_load.
get_valid(self, name: str = '__root__') -> bool
Get the 'valid' flag for a namespace.
set_valid(self, value: bool, name: str = '__root__') -> None
Set the 'valid' flag for a namespace.
unload_all(self, name: str = '__root__') -> None
Unload all of the directories for a namespace.
update_load_state(self, dir_type: datazen.enums.DataType, to_load: List[Union[pathlib.Path, str, NoneType]], name: str = '__root__') -> int
Proxy for update_load_state for a namespace.

Data descriptors inherited from datazen.environment.base.BaseEnvironment:
__dict__
dictionary for instance variables
__weakref__
list of weak references to the object

 
Data
        DEFAULT_LOADS = LoadedFiles(files=None, file_data=None)
List = typing.List
ROOT_NAMESPACE = '__root__'