Module pyboiler.imports
Import helpers
Functions
def get_imports(path) ‑> dict
-
Import all modules in a directory tree and returns them as a dictionary.
def get_locals(obj, ignore=None)
-
Return locals for
obj
, while ignoringignore
Args
obj
:Any
- dict of locals to parse.
ignore
:list[str]
, optional- list of strings to ignore, with some special syntaxes
:ig
- check if obj.iter().endswith(ig)!:ig
- only include obj.iter().endswith(ig)ig:
- check if obj.iter().startswith(ig)!ig:
- only include obj.iter().startswith(ig)Returns
A list of unique locals, ignoring anything starting with _ or values in ignore
def get_path(path: pathlib.Path, mod_path: pathlib.Path) ‑> str
-
Return the import path for a given pathlib.Path object