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

datazen - APIs for working with file paths.

 
Modules
       
os

 
Functions
       
advance_dict_by_path(path_list: List[str], data: Dict[str, Any]) -> Dict[str, Any]
Given a dictionary and a list of directory names, return the child
dictionary advanced by each key, in order, from the provided data.
format_resolve_delims(value: str, fmt_data: Dict[str, Any], delim: str = '.', delim_replace: str = '_') -> str
Attempt to resolve a format String with data, but handle replacements with
custom delimeters correctly.
get_path_list(root: Union[pathlib.Path, str, NoneType], current: Union[pathlib.Path, str, NoneType]) -> List[str]
From a root directory and a child path, compute the list of directories,
in order, mapping the root to the child.
resolve_dir(data: str, rel_base: str = '') -> str
Turn directory data into an absolute path, optionally from a relative
base.
unflatten_dict(data: Dict[str, Any], delim: str = '.') -> Dict[str, Any]
Attempt to unflatten dictionary data based on String keys and a delimeter.
walk_with_excludes(path: Union[pathlib.Path, str, NoneType], excludes: List[str] = None) -> Iterator[Tuple[str, List[str], List[str]]]
Behaves like os.walk but attempts to skip iterations that would enter
directories we want to exclude (and thus not traverse).

 
Data
        EXCLUDES = ['.git', '.svn', '.gitignore']
FMT_CLOSE = '}'
FMT_OPEN = '{'
GenericStrDict = typing.Dict[str, typing.Any]
Iterator = typing.Iterator
List = typing.List
Pathlike = typing.Union[pathlib.Path, str, NoneType]
Tuple = typing.Tuple