Module for work with importlib metadata


saturnin.lib.metadata.iter_entry_points(group: str, name: str = None) Generator[EntryPoint, None, None][source]

Replacement for pkg_resources.iter_entry_points.

  • group (str) – Entrypoint group name

  • name (str) – Etrypoint name.

Return type:

Generator[EntryPoint, None, None]

When name is specified, returns only EntryPoint with such name. When name is not specified, returns all entry points in group.

saturnin.lib.metadata.get_entry_point_distribution(entry_point: EntryPoint) Distribution | None[source]

Returns distribution that registered specified entry point, or None if distribution is not found. This function searches through all distributions, not only those that registered Saturnin components.


entry_point (EntryPoint) – Entry point for which the distribution is to be found.

Return type:

Distribution | None