skillfed

verlib2

A standalone bundle of "distutils.version" and "packaging.version", without anything else.

verlib2 v26.2 235.5K downloads/30d#9,000 on PyPI2
License unclear Active released

What it is and what it does

verlib2 bundles the version-parsing logic from both distutils and the packaging library into a single, lightweight standalone module. It provides LooseVersion and StrictVersion from PEP 386, plus the Version class from PEP 440, without requiring you to add packaging as a dependency or rely on the deprecated distutils standard library.

The package solves a practical problem: many projects need version comparison but want to avoid the overhead of packaging, or they're migrating away from distutils after its removal in Python 3.12. verlib2 bundles both implementations with backward-compatible syntax to support Python 3.6 and later, so you can import what you need and compare versions with a single lightweight dependency.

Use it for:

  • Parse and compare versions in build scripts or package management tools without adding packaging as a dependency.
  • Handle both PEP 386 (distutils) and PEP 440 (packaging) version formats in legacy or mixed codebases.
  • Replace deprecated distutils.version imports in projects targeting Python 3.12 and later where distutils was removed.

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

Provides standalone version comparison and parsing for PEP 386 and PEP 440 version schemes without requiring the full packaging library or deprecated distutils.

Yes. If you need version parsing and comparison without packaging as a dependency, or you're migrating from distutils, this is a practical drop-in. Low install friction, active maintenance, no known vulnerabilities. License treatment is unclear, so verify the actual license before use in proprietary code.

Install

verlib2 on PyPI

pip

pip install verlib2

uv

uv add verlib2

poetry

poetry add verlib2

Installing verlib2

Before you install

Low friction: pure Python wheel with only two lightweight runtime dependencies (importlib-metadata and typing-extensions). Active maintenance as of 37 days ago with recent commits.

Quickstart

pip install verlib2

from verlib2 import Version
assert Version("1.0.dev456") < Version("1!1.2.rev33+123456")

Verify before relying

  • Whether the bundled implementations remain synchronized with upstream projects as they evolve.
  • Performance characteristics compared to alternatives for large-scale version comparisons.

Package facts

License not declared (unclear)
Python support supports the current Python release (>=3.6)
Install friction low — pure-Python wheel
Runtime dependencies 2 — importlib-metadata, typing-extensions
Maintenance actively maintained — 37 days since the last release
Last repo commit
First released
Downloads 235,494/month — #9,000 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: verlib2-26.2-py3-none-any.whl

Keywords: distutils, packaging, pep386, pep440, version, versioning

Development Status :: 5 - Production/StableIntended Audience :: DevelopersIntended Audience :: Information TechnologyIntended Audience :: System AdministratorsProgramming Language :: PythonProgramming Language :: Python :: 3 :: OnlyProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Programming Language :: Python :: 3.15Programming Language :: Python :: 3.6Programming Language :: Python :: 3.7Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9Programming Language :: Python :: Free ThreadingProgramming Language :: Python :: Implementation :: CPythonProgramming Language :: Python :: Implementation :: PyPyTopic :: Software Development :: Build ToolsTopic :: Software Development :: LibrariesTopic :: Software Development :: Quality AssuranceTopic :: Software Development :: TestingTyping :: Typed

Tags

version comparisonpep 440 version parsingdistutils version standaloneversion string parsingsemantic versioning
version-managementpep440distutils-replacement

More Libraries packages