envinfopy
envinfopy is a Python Library to get execution environment information.
python3 -m pip install envinfopy
Get execution environment information as a dictionary:
>>> import envinfopy
>>> envinfopy.get_envinfo()
{'uname': 'Linux', 'python_implementation': 'CPython', 'python_version': '3.11.4', 'platform': 'Ubuntu 22.04.2 LTS'}
Get execution environment information and specific package version information:
>>> import envinfopy
>>> envinfopy.get_envinfo(["envinfopy"])
{'uname': 'Linux', 'python_implementation': 'CPython', 'python_version': '3.11.4', 'platform': 'Ubuntu 22.04.2 LTS', 'envinfopy': '0.1.0'}
Get environment information as Markdown:
python3 -m pip install envinfopy[markdown] # install optional dependencies
>>> import envinfopy
>>> print(envinfopy.dumps(["envinfopy"], format="markdown"))
| Module | Version |
| --------- | ------------------ |
| uname | Linux |
| Python | CPython 3.11.4 |
| platform | Ubuntu 22.04.2 LTS |
| envinfopy | 0.1.0 |
$ python3 -m install envinfopy[cli] # install optional dependencies $ python3 -m envinfopy envinfopy setuptools --format markdown | Module | Version | | ---------- | --------------------------------------- | | uname | Linux 5.15.90.1-microsoft-standard-WSL2 | | Python | CPython 3.11.4 | | platform | Ubuntu 22.04.2 LTS | | envinfopy | 0.0.7 | | setuptools | 67.8.0 |
usage: __main__.py [-h] [-V] [-v] [--format {text,markdown,md,json,itemize}] packages [packages ...] positional arguments: packages PyPI package names to extract versions options: -h, --help show this help message and exit -V, --version show program's version number and exit -v, --verbose --format {text,markdown,md,json,itemize} output format Issue tracker: https://github.com/thombashi/envinfopy/issues
Python 3.7+