debian-inspector
Utilities to parse Debian package, copyright and control files.
What it is and what it does
debian-inspector is a Python library for parsing Debian package manifests and metadata files in the Debian 822 format (an RFC822-like text format). It extracts and interprets control files, copyright declarations, dependency relationships, and version information from Debian packages and source archives. The library prioritizes flexible parsing over strict spec compliance—it can recover and fix copyright files that are close to the specification but not perfectly formatted, making it useful for tooling that must handle real-world, slightly malformed Debian metadata.
The package was built by remixing and refactoring code from several existing Debian utilities (python-deb-pkg-tools, dlt, PGPy, and python-dpkg) into a simpler, permissively licensed alternative to the GPL-licensed python-debian library. It focuses on parsing and inspection rather than generation, keeping the codebase lean. It depends only on chardet for character encoding detection and attrs for data structure management.
Use it for:
- Extract and validate package metadata from .deb files or Debian source archives in CI/CD pipelines.
- Parse copyright declarations and license information from Debian packages for compliance auditing.
- Resolve and compare Debian package versions and dependency constraints programmatically.
- Build tools that need to inspect Debian package control files without a GPL dependency.
- Recover and repair slightly malformed Debian 822 files in legacy or edge-case package repositories.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Parses Debian package metadata, copyright files, and control files in the Debian 822 format, with flexible recovery of imperfectly formatted files.
Yes, if you need to parse Debian package metadata in a permissively licensed codebase. The library is stable (Production/Stable classifier), has no known vulnerabilities, and low install friction. The aging maintenance status (no release in 316 days) is a minor concern for long-term support, but the unarchived repository and recent commits suggest it is not abandoned. Install it if Debian package inspection is core to your tool; skip it if you only need basic dpkg integration.
Install
debian-inspector on PyPI
pip
pip install debian-inspectoruv
uv add debian-inspectorpoetry
poetry add debian-inspectorInstalling debian-inspector
Before you install
Low friction: pure Python wheel with only chardet and attrs as runtime dependencies. Maintenance status is aging—last commit was 2025-10-02 and no release in 316 days—but the repository remains active and unarchived.
License in practice
Multi-licensed under Apache-2.0, BSD-3-Clause, and MIT—all permissive. Safe to use in commercial and permissive-licensed projects; no GPL contamination.
Quickstart
pip install debian-inspector
from debian_inspector.parser import parse_deb822_file
with open('control') as f:
fields = parse_deb822_file(f)
Requires Python 3.9 or later.
Verify before relying
- Whether the library can handle real-world malformed Debian files beyond the description's examples.
- Performance characteristics when parsing large or deeply nested dependency graphs.
- API stability and backward-compatibility guarantees across minor versions.
Package facts
| License | Apache-2.0 AND BSD-3-Clause AND MIT (permissive) |
| Python support | supports the current Python release (>=3.9) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 2 — chardet, attrs |
| Maintenance | aging — 316 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 158,129/month — #10,735 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: debian_inspector-31.1.1-py3-none-any.whl
Keywords: utilities, deb822, debian, copyright, package, dependency, license, dep5, control, dsc, python-debian, dpkg, libapt
Tags
More Software Development packages
Provides backported and experimental type hints…
permissive · top 100 on PyPI
numpyNumPy provides an N-dimensional array object…
permissive · top 100 on PyPI
fastapiFastAPI is a Python web framework for building…
permissive · top 100 on PyPI
annotated-docProvides a way to document function parameters,…
permissive · top 100 on PyPI
typerTyper builds command-line applications from…
permissive · top 1,000 on PyPI
distlibDistlib provides low-level packaging utilities…
permissive · top 1,000 on PyPI
deb-pkg-toolsBuilds, inspects, and manages Debian binary…
permissive · top 15,000 on PyPI
python-debianReads and manipulates Debian packaging metadata…
copyleft · top 5,000 on PyPI
bindepBindep checks for missing system binary…
permissive · top 5,000 on PyPI
version-utilsParses and compares package version strings in…
copyleft · top 15,000 on PyPI
stdebConverts Python packages into Debian source and…
permissive · top 15,000 on PyPI
pip-requirements-parserParses pip requirements files with the same…
permissive · top 1,000 on PyPI
ast-decompilerConverts Python abstract syntax trees (ASTs)…
permissive · top 15,000 on PyPI
humanfriendlyFormats and parses numbers, file sizes,…
permissive · top 1,000 on PyPI
PGPy13PGPy13 is a Python library for OpenPGP…
permissive · top 15,000 on PyPI
debsecan-mcpAn MCP server that scans Debian systems for…
unclear · top 15,000 on PyPI