Registry / data / debian-inspector

debian-inspector

JSON →
library31.1.1pypypiunverified

Utilities to parse Debian package, control, and copyright files. Current version 31.1.1, with a recent release cadence (multiple minor releases in 2025). Requires Python >=3.9.

pip install debian-inspector
INSTALL
IMPORT
SIG · DEBIAN-INSPECTOR
D
debian-inspector
datapythonv31.1.1
Install
1.8s avg
Import
Disk
18MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v31.1.1 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.95 runs
installs and imports cleanly · install 0.0s · import 0.000s · 19.8MB
glibc
py 3.103.95 runs
installs and imports cleanly · install 1.8s · import 0.000s · 21MB
18MB installed
● package 18MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

DpkgHandler
from debian_inspector import DpkgHandler
from debian_inspector import DpkgHandler

Parses a control file and a copyright file using top-level API.

from debian_inspector import DpkgHandler, Copyright # Parse a Debian control file (e.g., debian/control) with open('control', 'r') as f: control_text = f.read() handler = DpkgHandler(control_text) print(handler.paragraphs[0].get('Package')) # Parse a copyright file (e.g., /usr/share/doc/*/copyright) with open('copyright', 'r') as f: copyright_text = f.read() copyright_obj = Copyright(copyright_text) print(copyright_obj.paragraphs_license_expression())
debian-inspector --version
Debug
Known issues
breakingIn v31.0.0, the function `get_license_detection_from_nameless_paragraph` was renamed from a previous name? Actually it's a fix: the `licence` field in copyright files is now normalized to `license`. Code relying on the old field name `licence` may break.
fix
Update any code that references 'licence' field in copyright paragraphs to use 'license'.
affects: <31.0.0
deprecatedDirect import from submodules like `debian_inspector.dpkg` or `debian_inspector.copyright` is discouraged. Use top-level imports.
fix
Change imports to `from debian_inspector import DpkgHandler, Copyright, get_license_detection_from_nameless_paragraph`.
affects: >=31.0.0
gotchaThe class `DpkgHandler` expects a single string (the full control file content), not a file path. Passing a file path will raise an error.
fix
Read the file content first: `with open('control') as f: text = f.read(); handler = DpkgHandler(text)`.
affects: all
Upgrade
Version history
31.1.1latest on PyPI · released Oct 2, 2025
Audit
Dependencies

No dependency data recorded yet.

Agent activity
23 hits · last 30 days
node
20
OpenAI (training)
1
Resources
debian-inspector — pip install debian-inspector · libregistry