Distro Info

1.0 · active · verified Fri Apr 17

The `distro-info` library provides Python modules and data files with comprehensive information about Debian and Ubuntu distributions, including codenames, versions, release dates, and end-of-life dates. It is maintained by the Ubuntu Developers and is currently at version 1.0. Releases are stable and generally align with Debian/Ubuntu development cycles, focusing on data updates rather than frequent API changes.

Common errors

Warnings

Install

Imports

Quickstart

This quickstart demonstrates how to fetch information about the current Ubuntu development series and a specific Debian distribution using their respective submodules.

from distro_info.ubuntu import get_current, get_distro_info

# Get information about the current Ubuntu development series
current_ubuntu = get_current()
print(f"Current Ubuntu Series: {current_ubuntu.series} ({current_ubuntu.codename})")
print(f"Release Date: {current_ubuntu.release_date}")
print(f"Support until: {current_ubuntu.eol_date}")

# Get information for a specific Debian codename
debian_stretch = get_distro_info(codename='stretch')
if debian_stretch:
    print(f"\nDebian Stretch Version: {debian_stretch.version}")
    print(f"Debian Stretch Codename: {debian_stretch.codename}")
else:
    print("\nCould not find Debian 'stretch' information.")

view raw JSON →