Go to file
Niklas Rosenstein 0549ce8dbb
release 0.1.4
2022-07-21 13:44:34 +02:00
.changelog release 0.1.4 2022-07-21 13:44:34 +02:00
.github/workflows initial commit 2022-07-15 11:47:16 +02:00
src release 0.1.4 2022-07-21 13:44:34 +02:00
.flake8 initial commit 2022-07-15 11:47:16 +02:00
.gitignore initial commit 2022-07-15 11:47:16 +02:00
LICENSE initial commit 2022-07-15 11:47:16 +02:00
pyproject.toml release 0.1.4 2022-07-21 13:44:34 +02:00
readme.md update readme 2022-07-17 11:14:17 +02:00

readme.md

nr.python.environment

Utilities to work with Python environments.

API

function nr.python.environment.distributions.get_distributions(): Dict[str, Distribution]

Returns all distributions that can be found in the current Python environment. This can be useful to build a dependency graph or to collect the license of all packages used.

CLI

python -m nr.python.environment.distributions

Produce a CSV or JSON list of all distributions in the current Python environment. It can be used for example to get an overview of the different types of licenses for the Python packages installed in an environment:

$ python -m nr.python.environment.distributions  | jq .license_name -r | sort | uniq