datazen.load
index
/home/vkottler/src/vkottler/workspace/datazen/datazen/load.py

datazen - APIs for loading data from directory trees.

 
Modules
       
logging
os

 
Classes
       
builtins.tuple(builtins.object)
LoadedFiles

 
class LoadedFiles(builtins.tuple)
    LoadedFiles(files: Optional[List[str]] = None, file_data: Optional[Dict[str, Dict[str, Any]]] = None)
 
A collection of data for files loaded at runtime (or, a continuation of
this information loaded from a cache).
 
 
Method resolution order:
LoadedFiles
builtins.tuple
builtins.object

Methods defined here:
__getnewargs__(self)
Return self as a plain tuple.  Used by copy and pickle.
__repr__(self)
Return a nicely formatted representation string
_asdict(self)
Return a new dict which maps field names to their values.
_replace(self, /, **kwds)
Return a new LoadedFiles object replacing specified fields with new values

Class methods defined here:
_make(iterable) from builtins.type
Make a new LoadedFiles object from a sequence or iterable

Static methods defined here:
__new__(_cls, files: Optional[List[str]] = None, file_data: Optional[Dict[str, Dict[str, Any]]] = None)
Create new instance of LoadedFiles(files, file_data)

Data descriptors defined here:
files
Alias for field number 0
file_data
Alias for field number 1

Data and other attributes defined here:
__annotations__ = {'file_data': typing.Optional[typing.Dict[str, typing.Dict[str, typing.Any]]], 'files': typing.Optional[typing.List[str]]}
__match_args__ = ('files', 'file_data')
__orig_bases__ = (<function NamedTuple>,)
_field_defaults = {'file_data': None, 'files': None}
_fields = ('files', 'file_data')

Methods inherited from builtins.tuple:
__add__(self, value, /)
Return self+value.
__contains__(self, key, /)
Return bool(key in self).
__eq__(self, value, /)
Return self==value.
__ge__(self, value, /)
Return self>=value.
__getattribute__(self, name, /)
Return getattr(self, name).
__getitem__(self, key, /)
Return self[key].
__gt__(self, value, /)
Return self>value.
__hash__(self, /)
Return hash(self).
__iter__(self, /)
Implement iter(self).
__le__(self, value, /)
Return self<=value.
__len__(self, /)
Return len(self).
__lt__(self, value, /)
Return self<value.
__mul__(self, value, /)
Return self*value.
__ne__(self, value, /)
Return self!=value.
__rmul__(self, value, /)
Return value*self.
count(self, value, /)
Return number of occurrences of value.
index(self, value, start=0, stop=9223372036854775807, /)
Return first index of value.
 
Raises ValueError if the value is not present.

Class methods inherited from builtins.tuple:
__class_getitem__(...) from builtins.type
See PEP 585

 
Functions
       
data_added(key: Any, value: Any, data: Dict[str, Any] = None) -> Iterator[Dict[str, Any]]
Inject a key-value pair into a dictionary, in a context.
load_dir(path: Union[pathlib.Path, str, NoneType], existing_data: Dict[str, Any], variables: Dict[str, Any] = None, loads: datazen.load.LoadedFiles = LoadedFiles(files=None, file_data=None), expect_overwrite: bool = False, are_templates: bool = True, logger: logging.Logger = <Logger datazen.load (WARNING)>) -> vcorelib.io.types.LoadResult
Load a directory tree into a dictionary, optionally meld.
load_dir_only(path: Union[pathlib.Path, str, NoneType], expect_overwrite: bool = False, are_templates: bool = True, logger: logging.Logger = <Logger datazen.load (WARNING)>) -> vcorelib.io.types.LoadResult
A convenient wrapper for loading just directory data from a path without
worrying about melding data, resolving variables, enforcing schemas, etc.
load_files(file_paths: List[Union[pathlib.Path, str, NoneType]], root: str, meld_data: Tuple[Dict[str, Any], Dict[str, Any], bool], hashes: Dict[str, Dict[str, Any]] = None, expect_overwrite: bool = False, are_templates: bool = True) -> Tuple[List[str], int]
Load files into a dictionary and return a list of the files that are
new or had hash mismatches.
meld_and_resolve(path: Union[pathlib.Path, str, NoneType], existing_data: Dict[str, Any], variables: Dict[str, Any], globals_added: bool = False, expect_overwrite: bool = False, is_template: bool = True, **kwargs) -> bool
Meld dictionary data from a file into an existing dictionary, assume
existing data is a template and attempt to resolve variables.

 
Data
        DEFAULT_LOADS = LoadedFiles(files=None, file_data=None)
Dict = typing.Dict
GLOBAL_KEY = 'global'
GenericStrDict = typing.Dict[str, typing.Any]
Iterator = typing.Iterator
LOG = <Logger datazen.load (WARNING)>
List = typing.List
Optional = typing.Optional
Pathlike = typing.Union[pathlib.Path, str, NoneType]
Tuple = typing.Tuple