semver4
Semantic versioning module enriched by hotfix version
What it is and what it does
semver4 extends semantic versioning with a fourth numeric component to distinguish hotfix releases from standard patch releases. The standard semver 2.0 spec treats all backward-compatible bug fixes as patch increments, but this creates ambiguity when a hotfix must ship immediately while higher patch versions already exist as pre-release candidates. semver4 solves this by adding a 'fix' component: a version like 0.4.2.1 represents a hotfix to 0.4.2 without displacing pending 0.4.3 or 0.4.4 pre-releases.
The package provides two classes: Version4 for the extended four-part scheme and SemVersion for standard semver 2.0 parsing. Both support comparison, string representation, component mutation (inc_major, inc_minor, inc_patch, inc_fix), and serialization to JSON and YAML. It has no runtime dependencies and requires Python 3.8 or later.
Use it for:
- Distinguish hotfix releases from standard patch releases when pre-release versions already exist for higher patch numbers
- Parse and compare version strings that include a fourth numeric component in your release pipeline
- Serialize version objects to JSON or YAML for configuration files or API responses
- Migrate from standard semver 2.0 parsing while maintaining backward compatibility via the SemVersion class
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Parses and manipulates semantic versions with an optional fourth component for hotfix releases, plus standard semver 2.0 support.
Yes, if you need the four-part versioning scheme for hotfix management. The package is lightweight with no dependencies and permissive licensing. However, maintenance is dormant (last release March 2024, no recent commits), so treat it as stable-but-unsupported; do not expect bug fixes or updates if issues arise. Suitable for projects that have already adopted this versioning model or are willing to lock to a specific version.
Install
semver4 on PyPI
pip
pip install semver4uv
uv add semver4poetry
poetry add semver4Installing semver4
Before you install
Low install friction with no runtime dependencies. Maintenance is dormant—last release was 2024-03-24 and no commits since 2024-12-30—so expect no active support or updates.
License in practice
MIT license is permissive; you may use, modify, and distribute this package freely with minimal restrictions.
Quickstart
from semver4 import Version4, SemVersion
# Four-part version with hotfix component
v = Version4('0.4.2.1-beta+build123')
print(v.fix) # 1
v.inc_fix()
print(v) # 0.4.2.2-beta+build123
# Standard semver 2.0
v2 = SemVersion('1.2.3-alpha+007')
print(v2) # 1.2.3-alpha+007
Requires Python 3.8 or later. YAML serialization requires PyYAML to be installed separately.
Verify before relying
- Whether the package is actively maintained or has been abandoned despite the dormant status
- Real-world adoption and stability of the four-part versioning scheme in production environments
- Whether YAML serialization features are documented or tested beyond the excerpt
Package facts
| License | MIT (permissive) |
| Python support | supports the current Python release (>=3.8) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | none |
| Maintenance | dormant — 873 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 416,108/month — #6,821 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: semver4-0.0.1b8-py3-none-any.whl
Keywords: version, versioning, semantic, semver
Tags
More Software Development packages
Provides backported and experimental type hints…
permissive · top 100 on PyPI
numpyNumPy provides an N-dimensional array object…
permissive · top 100 on PyPI
fastapiFastAPI is a Python web framework for building…
permissive · top 100 on PyPI
annotated-docProvides a way to document function parameters,…
permissive · top 100 on PyPI
typerTyper builds command-line applications from…
permissive · top 1,000 on PyPI
distlibDistlib provides low-level packaging utilities…
permissive · top 1,000 on PyPI
semverParse, compare, and manipulate semantic version…
permissive · top 1,000 on PyPI
release-tagAutomatically creates and optionally pushes…
permissive · top 15,000 on PyPI
semantic-versionParses, validates, and compares semantic…
permissive · top 1,000 on PyPI
bump-my-versionAutomates version number management in projects…
permissive · top 5,000 on PyPI
pyarrow-hotfixDisables the CVE-2023-47248 security…
permissive · top 1,000 on PyPI
bumpAutomatically increments version numbers in…
permissive · top 15,000 on PyPI
parverparver parses and manipulates PEP 440 version…
permissive · top 5,000 on PyPI
autosemverAutomatically generates semantic versions for…
copyleft · top 15,000 on PyPI
python-semantic-releaseAutomates semantic versioning and release…
permissive · top 5,000 on PyPI
node-semverParses and compares semantic version strings…
permissive · top 5,000 on PyPI