version-utils
Library for parsing system package strings and comparing package versions
What it is and what it does
version_utils is a pure-Python library for parsing and comparing package version strings, currently supporting RPM/Yum format. It provides functions to extract package metadata (name, epoch, version, release, architecture) and compare versions using the same logic as the rpm command-line tool, without requiring the rpm tool or any system dependencies to be installed.
The library is designed for scenarios where you need version comparison in unit tests, deployment scripts, or environments without access to system package managers. It offers a Package class for structured access to parsed package information and comparison functions that work identically to their command-line equivalents, making results predictable and portable across systems.
Use it for:
- Compare installed RPM package versions against requirements in a deployment script without calling rpm command-line tools
- Parse and extract metadata from RPM package strings in a cross-platform Python application or test suite
- Validate package version constraints in CI/CD pipelines running on systems without rpm or yum installed
- Build package management logic that works consistently across different Linux distributions without distro-specific tools
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Parses and compares package version strings in RPM/Yum format using pure Python, without requiring system tools or external dependencies.
No. The project is abandoned (last commit 2022-05-05) with no maintenance signal. While it has no dependencies and the GPLv3 license is clear, the lack of updates means it will not receive bug fixes, security patches, or compatibility updates for modern Python versions. Use only if locked into an older codebase that already depends on it; for new projects, consider actively maintained alternatives.
Install
version-utils on PyPI
pip
pip install version-utilsuv
uv add version-utilspoetry
poetry add version-utilsInstalling version-utils
Before you install
Installation is frictionless—the package has no runtime dependencies and ships as a wheel. However, maintenance is a concern: the last commit was 2022-05-05 and the project is marked abandoned, meaning bug fixes and compatibility updates are unlikely.
License in practice
Licensed under GPLv3 (copyleft). Any code that imports this package must also be GPLv3-compatible or dual-licensed; proprietary or permissive-licensed projects may face licensing conflicts.
Quickstart
from version_utils import rpm
# Parse an RPM package string
pkg = rpm.package('perl-Compress-Raw-Zlib-2.021-136.el6_6.1.x86_64')
print(pkg.name, pkg.version, pkg.release)
# Compare two versions
result = rpm.compare_versions('2.021-136', '2.021-138')
if result < 0:
print('First version is older')
Verify before relying
- Whether the package remains compatible with modern Python versions beyond 3.5, given classifiers list only up to 3.5
- Whether Debian/dpkg support mentioned as 'in the near future' was ever implemented in later releases
- Real-world reliability of RPM version comparison logic against current RPM standards
Package facts
| License | License :: OSI Approved :: GNU General Public License v3 (GPLv3) (copyleft) |
| Python support | not specified |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | none |
| Maintenance | abandoned — 1,561 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 77,424/month — #14,527 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: version_utils-0.3.2-py2.py3-none-any.whl
Keywords: ihiji, version, compare, parse, rpm, yum, versions, comparison, utility, utilities, control, distribution
Tags
More Python Modules packages
Converts domain names between Unicode and…
permissive · top 100 on PyPI
setuptoolsSetuptools is a Python build backend and…
permissive · top 100 on PyPI
PyYAMLPyYAML parses and emits YAML 1.1 data format,…
permissive · top 100 on PyPI
pydanticPydantic validates Python data structures…
permissive · top 100 on PyPI
annotated-typesProvides reusable metadata objects for use with…
permissive · top 100 on PyPI
typing-inspectionProvides runtime tools to inspect and…
permissive · top 100 on PyPI
kojiKoji is a command-line client and library for…
copyleft · top 15,000 on PyPI
rpm-vercmpCompares RPM package version strings using the…
permissive · top 15,000 on PyPI
rpmfileInspect and extract files from RPM archive…
permissive · top 5,000 on PyPI
rpmProvides access to system RPM Python bindings…
permissive · top 15,000 on PyPI
jsoncomparisonCompares two JSON-like objects and returns a…
permissive · top 5,000 on PyPI
mozilla-versionParse and validate Mozilla product version…
copyleft · top 15,000 on PyPI
debian-inspectorParses Debian package metadata, copyright…
permissive · top 15,000 on PyPI
awesomeversionParse and compare version strings across…
permissive · top 5,000 on PyPI
python-debianReads and manipulates Debian packaging metadata…
copyleft · top 5,000 on PyPI
pyjsonCompares the similarity between two JSON files…
permissive · top 15,000 on PyPI