--- id: rpmfile version: "2.2.1" license: MIT license_treatment: permissive maintenance: active --- # rpmfile — Read rpm archive files License: permissive · Maintenance: active · Downloads: 1.1M/mo ## What it is and what it does rpmfile is a Python library for reading and inspecting RPM archive files, designed to mirror the interface of Python's built-in tarfile module. It lets you open an RPM, examine its headers and metadata, list contents, and extract individual files programmatically without needing system RPM tools. The package supports both standard and zstd-compressed RPM files (the latter requires an optional zstandard dependency). It provides both a Python API for programmatic access and command-line tools for listing, extracting, and displaying RPM information. The library has been maintained since 2014 and currently supports Python 3.10 through 3.14. Use it for: - Extract specific files from RPM packages in build or deployment automation scripts. - Inspect RPM headers and metadata without installing the package on the system. - Parse RPM contents in CI/CD pipelines to validate package structure or contents. - Read RPM files from remote sources via stdin in shell pipelines. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Inspect and extract files from RPM archive files using a Python API modeled after the standard tarfile module. Yes. Low install friction, no runtime dependencies, active maintenance, MIT license, and zero known vulnerabilities make this a safe choice. Install it if you need to programmatically work with RPM files in Python without relying on system RPM tools. ## Install pip install rpmfile uv add rpmfile poetry add rpmfile ## Installing rpmfile Before you install: Low friction installation with no runtime dependencies. Active maintenance with recent commits and a stable release history since 2014. License in practice: MIT license permits unrestricted use, modification, and distribution with minimal legal constraint. Quickstart: import rpmfile with rpmfile.open('file.rpm') as rpm: print(rpm.headers.keys()) fd = rpm.extractfile('./usr/bin/script') print(fd.read()) Requires Python >= 3.10; optional zstandard module needed for zstd-compressed RPMs. Verify before relying: - Whether zstandard is truly optional or required for common RPM variants in practice. - Performance characteristics when handling large RPM files or batch extraction. ## Package facts - License: MIT (permissive) - Python support: supports_current - Install friction: low - Maintenance: active - Downloads: 1.1M/month (top 5,000 on PyPI) - Known vulnerabilities: none known ## Tags read rpm files python, extract rpm archive, inspect rpm metadata, rpm file parser, rpm archive tools, rpm extraction library, rpm-archive, package-inspection [View on SkillFed](https://skillfed.io/packages/rpmfile) · [View on PyPI](https://pypi.org/project/rpmfile/)