skillfed

debian-inspector

Utilities to parse Debian package, copyright and control files.

debian-inspector v31.1.1 158.1K downloads/30d#10,735 on PyPI17
Permissive license Apache-2.0 AND BSD-3-Clause AND MIT AGING released

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-inspector

uv

uv add debian-inspector

poetry

poetry add debian-inspector

Installing 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

Development Status :: 5 - Production/StableIntended Audience :: DevelopersProgramming Language :: Python :: 3Programming Language :: Python :: 3 :: OnlyProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.6Programming Language :: Python :: 3.7Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9Topic :: Software DevelopmentTopic :: Utilities

Tags

debian package parsingdeb822 format parserdebian control filecopyright file parserdebian metadata extractiondpkg utilitiesdebian dependency parsing
debian-packagingmetadata-parsing

More Software Development packages