pyfileconf.imports.logic.load package

Submodules

pyfileconf.imports.logic.load.ext_importlib module

pyfileconf.imports.logic.load.ext_importlib.find_spec(name, package=None)[source]

Return the spec for the specified module.

Note: this is a modification of importlib.util.find_spec which does not import parent packages. It instead recursively searches through the parents.

First, sys.modules is checked to see if the module was already imported. If so, then sys.modules[name].__spec__ is returned. If that happens to be set to None, then ValueError is raised. If the module is not in sys.modules, then sys.meta_path is searched for a suitable spec with the value of ‘path’ given to the finders. None is returned if no spec could be found.

If the name is for submodule (contains a dot), find_spec is called on the parent module to determine the submodule_search_locations.

The name and package arguments work the same as importlib.import_module(). In other words, relative module names (with leading dots) work.

Return type

ModuleSpec

pyfileconf.imports.logic.load.ext_importlib.get_filepath_from_module_str(module_str, location_section_path_str=None)[source]

pyfileconf.imports.logic.load.func module

pyfileconf.imports.logic.load.func.function_args_as_dict(func)[source]
pyfileconf.imports.logic.load.func.get_variable_name_of_obj(obj)[source]
Return type

str

pyfileconf.imports.logic.load.klass module

pyfileconf.imports.logic.load.klass.class_function_args_as_dict(klass)[source]

To be used on regular methods of a class e.g. ExampleClass.__init__, not on methods of an instance of the class

Return type

Dict[str, Any]

pyfileconf.imports.logic.load.name module

pyfileconf.imports.logic.load.name.get_imported_obj_variable_name(obj, module)[source]
Return type

str

pyfileconf.imports.logic.load.name.get_module_and_name_imported_from(obj, search_list=None)[source]
Return type

Tuple[module, str]

pyfileconf.imports.logic.load.name.is_imported_name(name, search_list=None)[source]
Return type

bool

pyfileconf.imports.logic.load.name.is_imported_obj(obj, search_list=None)[source]
Return type

bool

pyfileconf.imports.logic.load.skipmodules module