skillfed

version-utils

Library for parsing system package strings and comparing package versions

version-utils v0.3.2 77.4K downloads/30d#14,527 on PyPI15
Copyleft license License :: OSI Approved :: GNU General Public License v3 (GPLv3) Abandoned released

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

uv

uv add version-utils

poetry

poetry add version-utils

Installing 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

Development Status :: 3 - AlphaEnvironment :: ConsoleEnvironment :: PluginsIntended Audience :: DevelopersLicense :: OSI Approved :: GNU General Public License v3 (GPLv3)Natural Language :: EnglishOperating System :: OS IndependentProgramming Language :: Python :: 2.6Programming Language :: Python :: 2.7Programming Language :: Python :: 3Programming Language :: Python :: 3.4Programming Language :: Python :: 3.5Topic :: Software Development :: Libraries :: Python ModulesTopic :: Software Development :: Version ControlTopic :: System :: Software DistributionTopic :: Utilities

Tags

rpm version comparisonparse package version stringsversion parsing libraryrpm package parsingcompare rpm versionsyum package versionpure python version utils
version-parsingrpm-yumabandoned

More Python Modules packages