datazen.classes.data_repository
index
/home/vkottler/src/vkottler/workspace/datazen/datazen/classes/data_repository.py

datazen - An interface for managing on-disk data by loading it and making
          discrete changes.

 
Modules
       
logging
os
threading

 
Classes
       
builtins.object
DataRepository

 
class DataRepository(builtins.object)
    DataRepository(root_dir: str, out_type: str = 'yaml', logger: logging.Logger = <Logger datazen.classes.data_repository (WARNING)>) -> None
 
A class for interacting with file-backed databases that are built with
serialization formats supported by this package.
 
  Methods defined here:
__init__(self, root_dir: str, out_type: str = 'yaml', logger: logging.Logger = <Logger datazen.classes.data_repository (WARNING)>) -> None
Construct a new data repository.
loaded(self, root_rel: str = '.', write_back: bool = True) -> Iterator[Dict[str, Any]]
Load a data directory, yield it to the caller and write it back when
complete inside a locked context for this repository.
meld(self, data: Dict[str, Any], root_rel: str = '.', expect_overwrite: bool = False) -> Iterator[git.repo.base.Repo]
Update the data at some root-relative path, write it to disk and then
provided the repository object still within a locked context.

Data descriptors defined here:
__dict__
dictionary for instance variables
__weakref__
list of weak references to the object

 
Data
        EXCLUDES = ['.git', '.svn', '.gitignore']
GenericStrDict = typing.Dict[str, typing.Any]
Iterator = typing.Iterator