--- id: python-debian version: "1.1.1" license: GPL-2.0-or-later license_treatment: copyleft maintenance: active --- # python-debian — Modules to read and manipulate many file formats related to Debian packages and repositories License: copyleft · Maintenance: active · Downloads: 1.5M/mo ## What it is and what it does python-debian provides a collection of Python modules for working with Debian-specific file formats and metadata. It handles changelogs, control files (debian/control, .changes, .dsc, Packages, Sources, Release), Debtags information, package indexes with pdiffs, and raw .deb and .ar archives. The library supports both reading and, for some formats, creating or editing these files. The package is designed for developers who need to programmatically inspect or manipulate Debian packaging data. It has no runtime dependencies and requires Python 3.7 or later. Some modules can optionally use python-apt to speed up processing, but this is not required for basic functionality. Use it for: - Parse debian/changelog files to extract version history and release notes from Debian packages. - Read control files (.dsc, .changes, Packages) to extract package metadata and dependencies. - Extract and inspect contents of .deb archive files without unpacking them to disk. - Process Debtags information to categorize or filter Debian packages by their tags. - Build tools that analyze Debian repository indexes or generate package metadata. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Reads and manipulates Debian packaging metadata formats including changelogs, control files, package indexes, and raw .deb archives. Yes, if you work with Debian packaging data. Low install friction, no dependencies, production-stable, actively maintained, and no known vulnerabilities make it a straightforward choice for Debian-focused tooling. The copyleft license requires that any derivative work be open-source. ## Install pip install python-debian uv add python-debian poetry add python-debian ## Installing python-debian Before you install: Low install friction with no runtime dependencies. Actively maintained with production-stable status and support for current Python versions. License in practice: GPL-2.0-or-later copyleft license means any derivative work or bundled distribution must also be open-source under compatible terms. Quickstart: pip install python-debian from debian.changelog import Changelog from debian.deb822 import Deb822 # Read a changelog with open('debian/changelog') as f: changelog = Changelog(f) # Parse a control file with open('debian/control') as f: for para in Deb822.iter_paragraphs(f): print(para['Package']) Requires Python 3.7 or later. Verify before relying: - Whether optional python-apt integration is automatically detected or requires manual configuration. - Performance characteristics when processing large .deb files or repository indexes. - Which specific Debian data formats support write/edit operations versus read-only access. ## Package facts - License: GPL-2.0-or-later (copyleft) - Python support: supports_current - Install friction: low - Maintenance: active - Downloads: 1.5M/month (top 5,000 on PyPI) - Known vulnerabilities: none known ## Tags debian package metadata parsing, read debian changelog, parse control files, deb archive extraction, debian package information, RFC822 debian formats, debian repository data, debian-packaging, metadata-parsing [View on SkillFed](https://skillfed.io/packages/python-debian) · [View on PyPI](https://pypi.org/project/python-debian/)