skillfed

versions

Parsing, inspecting and specifying versions.

versions v2.1.2 98.6K downloads/30d#13,068 on PyPI7
Permissive license MIT DORMANT released

What it is and what it does

versions is a semantic version parser and matcher for Python. It parses version strings into structured objects with named segments (release, pre-release, dev, local), supports total ordering for comparison, and can match versions against specification sets or individual specifiers. The package also provides utilities to extract version attributes from Python modules.

The library is built on a stack of utility dependencies and is fully typed. It's useful when you need to programmatically work with version constraints—parsing user input, comparing releases, or checking whether a given version satisfies a requirement—rather than relying on string comparison or external tools.

Use it for:

  • Parse and compare semantic versions in dependency resolution or package management workflows.
  • Match a given version against a version set or specifier to validate compatibility.
  • Extract and inspect version components from version strings programmatically.
  • Programmatically check version requirements in build scripts or runtime version guards.
  • Access the __version__ attribute of installed packages for logging or compatibility checks.

Worth the install?

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

Parses, compares, and validates semantic versions and version specifications, supporting version strings with pre-release, dev, and local segments.

Yes, if you need robust version parsing and matching in your application. The package is production-stable, permissively licensed, has zero known vulnerabilities, and carries low install friction. The main caveat is dormant maintenance—last release was 900 days ago—so if you encounter a bug or need a feature, expect slow or no response. For straightforward version handling, it's a solid choice; for active development requiring rapid fixes, consider the maintenance lag.

Install

versions on PyPI

pip

pip install versions

uv

uv add versions

poetry

poetry add versions

Installing versions

Before you install

Low install friction; pure Python wheel. Maintenance is dormant—last release was 900 days ago, though the repository remains active with a recent commit. The package is marked production/stable and supports Python 3.8 through 3.12.

License in practice

MIT license is permissive; you can use this package freely in commercial and private projects with minimal restrictions, provided you retain the license notice.

Quickstart

from versions import parse_version, parse_version_set

version = parse_version("1.3.0")
version_set = parse_version_set("^1.0.0")
print(version.matches(version_set))  # True

Requires Python 3.8 or above.

Verify before relying

  • Whether the package handles all version specification edge cases or has known limitations.
  • Performance characteristics when parsing or comparing large numbers of versions.
  • Whether dormant status means the package will receive security updates if vulnerabilities are discovered.

Package facts

License MIT (permissive)
Python support supports the current Python release (>=3.8)
Install friction low — pure-Python wheel
Runtime dependencies 9 — attrs, typing-aliases, typing-extensions, click, funcs, iters, orderings, solus, entrypoint
Maintenance dormant — 900 days since the last release
Last repo commit
First released
Downloads 98,638/month — #13,068 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: versions-2.1.2-py3-none-any.whl

Keywords: python, semver, version

Development Status :: 5 - Production/StableIntended Audience :: DevelopersLicense :: OSI Approved :: MIT LicenseOperating System :: OS IndependentProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9Topic :: UtilitiesTyping :: Typed

Tags

semantic version parsingversion comparison and matchingversion handling libraryversion specification matchingsemver parsing libraryversion requirement validationparse version strings
version-managementsemver

More Utilities packages