module
frequenz.core.module ¤
Tools for dealing with Python modules.
Functions¤
frequenz.core.module.get_public_module_name ¤
Get the name of the public module containing the given module name.
- Modules are considered private if they start with
_. - All modules inside a private module are also considered private, even if they
don't start with
_. - If there is no leading public part,
Noneis returned.
Example
Here are a few examples of how this function will resolve module names:
some.pub->some.pubsome.pub._some._priv->some.pubsome.pub._some._priv.public->some.pubsome.pub._some._priv.public._private->some.pub_priv->None
| PARAMETER | DESCRIPTION |
|---|---|
module_name
|
The fully qualified name of the module to get the public name for
(normally the
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
str | None
|
The name of the public module containing the given module name. |