pygada_runtime.module Module

Package containing everything for accessing Python modules.

Gada takes advantage of how Python packages are installed in the PYTHONPATH for dynamically discovering and loading installed nodes.

So it heavily relies on pkgutil and importlib for accessing and getting informations on installed packages.

pygada_runtime.module.module_name()[source]

Get the name of a module.

Parameters

mod (Union[ModuleInfo, module, str]) – a module-like object

Return type

str

pygada_runtime.module.module_path()[source]

Get the absolute path to a module.

Parameters

mod (Union[ModuleInfo, module, str]) – a module-like object

Return type

str

pygada_runtime.module.gada_yml_path()[source]

Get the absolute path to the gada.yml file of a module.

Parameters

mod (Union[ModuleInfo, module, str]) – a module-like object

Return type

str

pygada_runtime.module.load_gada_yml()[source]

Load the gada.yml file of a module.

Parameters

mod (Union[ModuleInfo, module, str]) – a module-like object

Return type

dict

pygada_runtime.module.iter_modules()[source]

Yield top-level modules containing a gada.yml file.

This function only returns top-level modules installed in the PYTHONPATH. See walk_modules() for a fully recursive version.

Parameters

mod (Union[ModuleInfo, module, str, None]) – a module-like object

Return type

Iterable[ModuleInfo]

pygada_runtime.module.walk_modules()[source]

Yield all modules containing a gada.yml file recursively.

This function recursively analyze the modules installed in the PYTHONPATH to return not only the top-level modules, but also the submodules containing a gada.yml file. See iter_modules() for a non recursive version.

Parameters

mod (Union[ModuleInfo, module, str, None]) – a module-like object

Return type

Iterable[ModuleInfo]