semantic-version
A library implementing the 'SemVer' scheme.
Decision gist · record as of 2026-08-14
Yes, for stable SemVer handling in Python projects. The package is mature, production-stable, has no dependencies, and carries no security vulnerabilities. Dormant maintenance is acceptable here because SemVer itself is a fixed specification unlikely to require frequent updates. Install it when you need reliable version parsing and comparison.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Low install friction with no runtime dependencies.
- Maintenance is dormant—last release was 2022-05-26, though the repository remains active with a recent commit on 2024-04-04.
- Suitable for stable, mature use cases where the SemVer spec itself is unlikely to change.
License · maintenance · safety
BSD (permissive) — BSD license is permissive, allowing commercial and private use with minimal restrictions. No licensing concerns for most projects.
last release 2022-05-26 (1541 days) · last repo commit 2024-04-04 · 293 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 53,316,760 downloads/mo, #553 on PyPI
Alternatives
Verify before relying
pip install semantic-version
import semantic_version
v = semantic_version.Version('0.1.1')
print(v.major, v.minor, v.patch)
spec = semantic_version.SimpleSpec('>=0.1.0,<0.4.0')
print(v in spec)- Whether the package actively maintains compatibility with Python versions beyond 3.10 or newer Python releases.
- Current real-world adoption and whether dormant maintenance poses practical risks for new projects.
What it is and what it does
semantic-version is a small, dependency-free library for parsing, validating, and working with semantic version strings in Python. It implements the SemVer 2.0.0 specification strictly, providing a Version class to represent individual version numbers (e.g., 0.1.1-alpha+build.2012-05-15) with access to major, minor, patch, prerelease, and build components. It also offers version comparison, bumping (next_major, next_minor, next_patch), and coercion of non-standard version strings into valid semver format.
Beyond individual versions, the library provides specification classes (SimpleSpec and NpmSpec) to describe and match ranges of acceptable versions. SimpleSpec uses a natural, PyPI-like syntax (e.g., >=0.1.1,<0.3.0), while NpmSpec supports the full NPM range scheme. Both allow filtering and selecting versions from iterables, making it useful for dependency resolution, version constraint validation, and release management workflows.
Use it for
- Parse and validate version strings in package metadata or configuration files to ensure they conform to SemVer.
- Compare versions programmatically to determine if an installed package meets a minimum or maximum version requirement.
- Filter a list of available versions against a specification to find compatible releases for dependency resolution.
- Bump version numbers automatically during release workflows (e.g., incrementing major, minor, or patch).
- Coerce non-standard version strings (e.g., from user input or legacy systems) into valid SemVer format for downstream processing.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes, for stable SemVer handling in Python projects.
The package is mature, production-stable, has no dependencies, and carries no security vulnerabilities. Dormant maintenance is acceptable here because SemVer itself is a fixed specification unlikely to require frequent updates. Install it when you need reliable version parsing and comparison.
Install
semantic-version on PyPI
Before you install
Low install friction with no runtime dependencies. Maintenance is dormant—last release was 2022-05-26, though the repository remains active with a recent commit on 2024-04-04. Suitable for stable, mature use cases where the SemVer spec itself is unlikely to change.
License in practice
BSD license is permissive, allowing commercial and private use with minimal restrictions. No licensing concerns for most projects.
Quickstart
pip install semantic-version
import semantic_version
v = semantic_version.Version('0.1.1')
print(v.major, v.minor, v.patch)
spec = semantic_version.SimpleSpec('>=0.1.0,<0.4.0')
print(v in spec)
Verify before relying
- Whether the package actively maintains compatibility with Python versions beyond 3.10 or newer Python releases.
- Current real-world adoption and whether dormant maintenance poses practical risks for new projects.
Package facts
| License | BSD permissive |
| Python support | Supports the current Python release >=2.7 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | None |
| Maintenance | Dormant 1,541 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 53,316,760 / month, #553 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Development Status :: 5 - Production/StableIntended Audience :: DevelopersLicense :: OSI Approved :: BSD LicenseOperating System :: OS IndependentProgramming Language :: PythonProgramming Language :: Python :: 2.7Programming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.4Programming Language :: Python :: 3.5Programming Language :: Python :: 3.6Programming Language :: Python :: 3.7Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9Topic :: Software Development :: Libraries :: Python Modules |
Evidence: semantic_version-2.10.0-py2.py3-none-any.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “semver validation”
- semantic-versionParses, validates, and compares semantic version strings according to…
- versionsParses, compares, and validates semantic versions and version…
- node-semverParses and compares semantic version strings using Node.js semver…
Give your agent the search over MCP, or paste the wish link into any chat.
More Python Modules packages
Converts domain names between Unicode and ASCII-compatible encoding (Punycode) according to IDNA 2008 and Unicode Technical Standard 46, with security validation and broader script coverage than the standard library.
Install it if you work with internationalized domain names, need to validate domains, or use HTTP clients that depend on it transitively.
Setuptools is a Python build backend and package management tool that handles building, distributing, and installing Python packages, including support for C/C++ extension modules.
PyYAML parses and emits YAML 1.1 data format, enabling serialization and deserialization of configuration files and Python objects to and from human-readable YAML text.
Pydantic validates Python data structures against type hints, coercing and checking input at runtime to ensure it matches a declared schema.
Provides reusable metadata objects for use with PEP-593 `typing.Annotated` to express common constraints like bounds, collection sizes, and predicates on types.
Install it if you use or build libraries that need to express type constraints in a standardized, inspectable way—or if you want to annotate your own types with…
Provides runtime tools to inspect and introspect Python type annotations, enabling programmatic examination of type hints at execution time.
See also semver · node-semver · autosemver · python-semantic-release · semver4 · release-tag · bump-my-version · parver · bump · hl7apy