distro
Distro - an OS platform information API
Install
distro on PyPI
pip
pip install distrouv
uv add distropoetry
poetry add distroPackage facts
| License | Apache License, Version 2.0 (permissive) |
| Python support | supports the current Python release (>=3.6) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | none |
| Maintenance | actively maintained — 963 days since the last release |
| Last repo commit | |
| First released | |
| Popularity | one of the top 1,000 most-downloaded packages on PyPI (30-day window, as of 2026-08-13) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-13) |
Evidence: distro-1.9.0-py3-none-any.whl
About distro
from the package's own PyPI description — quoted content, verbatim
Distro - an OS platform information API
CI Status (image) PyPI version (image) Supported Python Versions (image) Code Coverage (image) Is Wheel (image) Latest Github Release (image)
distro provides information about the
OS distribution it runs on, such as a reliable machine-readable ID, or
version information.
It is the recommended replacement for Python's original
platform.linux_distribution
function (removed in Python 3.8). It also...
Read as markdown · JSON record · Source repository · Homepage
AI interpretation — verify before relying
AI-generated interpretation of the package facts above; every digit, version, license, or vulnerability id it cites is grounded in the facts already shown on this page
distro provides a reliable, machine-readable API to identify the Linux or BSD distribution and version running on the current system, replacing Python's deprecated platform.linux_distribution function.
Low friction: pure Python wheel with zero runtime dependencies. Active maintenance with recent commits and stable production status since 2016.
Apache License 2.0 (permissive): you may use, modify, and distribute distro freely in commercial and private projects, provided you include the license notice.
Usage
pip install distro
import distro
print(distro.name(pretty=True))
print(distro.id())
print(distro.version(best=True))
Requires Python 3.6+; designed for Linux and BSD systems (Windows and macOS support not yet available).
Verdict: distro is a mature, well-maintained library with no known vulnerabilities, zero dependencies, and broad platform support across Python 3.6–3.12. It is the standard replacement for deprecated platform.linux_distribution and is safe to vendor. Suitable for any project needing reliable OS distribution detection.
Needs verification
- Whether the package's claim of being vendorable (safe to copy into projects) has been validated in practice by major consumers.
- Performance characteristics when querying distribution info on systems with multiple data sources present.
Similar packages
permissive · top 1,000 on PyPI
opentelemetry-instrumentationpermissive · top 1,000 on PyPI
scramppermissive · top 1,000 on PyPI
asynciopermissive · top 1,000 on PyPI
mysqlclientcopyleft · top 1,000 on PyPI
bcryptpermissive · top 1,000 on PyPI
certificopyleft · top 100 on PyPI
identifypermissive · top 1,000 on PyPI
cssselectpermissive · top 1,000 on PyPI
python-json-loggerpermissive · top 1,000 on PyPI