py_research.reflect.dist module#

Utils for reflecting the Python distributions.

get_distributions()[source]#

Get all installed Python package distributions.

Return type:

dict[str, Distribution]

get_module_file(module)[source]#

Get the file of given module, if any.

Parameters:

module (module) –

Return type:

Path | None

get_module_distribution(module)[source]#

Get the distribution package of given module, if any.

Parameters:

module (module) –

Return type:

Distribution | None

get_file_repo(path)[source]#

Get the Git repository of given file, if any.

Parameters:

path (Path) –

Return type:

Repo | None

get_module_repo(module)[source]#

Get the Git repository of given module, if any.

Parameters:

module (module) –

Return type:

Repo | None

get_project_urls(dist, key)[source]#

Get the documentation URL of given distribution, if any.

Parameters:
  • dist (Distribution) –

  • key (str) –

Return type:

list[str]

get_py_inventory(docs_url)[source]#

Return object inventory for given documentation URL.

Parameters:

docs_url (str) –

Return type:

dict[str, tuple[str, str, str, str]]