skillfed

distro

Distro - an OS platform information API

distro Permissive license Apache License, Version 2.0 Active 281 v1.9.0 released

Install

distro on PyPI

pip

pip install distro

uv

uv add distro

poetry

poetry add distro

Package 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

Development Status :: 5 - Production/StableIntended Audience :: DevelopersIntended Audience :: System AdministratorsLicense :: OSI Approved :: Apache Software LicenseOperating System :: POSIX :: BSDOperating System :: POSIX :: BSD :: FreeBSDOperating System :: POSIX :: BSD :: NetBSDOperating System :: POSIX :: BSD :: OpenBSDOperating System :: POSIX :: LinuxProgramming Language :: Python :: 3Programming Language :: Python :: 3 :: OnlyProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.6Programming Language :: Python :: 3.7Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9Topic :: Software Development :: Libraries :: Python ModulesTopic :: System :: Operating System

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.
linux distribution detectionos platform informationget linux distro name versionplatform.linux_distribution replacementsystem distribution identificationbsd distro detectionos-release parser

Similar packages