Registry / devops / semver4

semver4

JSON →
library0.0.1b8pypypiunverified

Semver4 is a Python library for parsing, comparing, and incrementing semantic versions, extended with an optional hotfix version field. Currently at 0.0.1b8 (beta), it supports Python 3.8+ and provides a simple API for version manipulation. The project is under active development on GitHub.

pip install semver4
INSTALL
IMPORT
SIG · SEMVER4
S
semver4
devopspythonv0.0.1b8
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

Semver4
from semver4 import Semver4
from semver4 import SemVer
Class name is Semver4, not SemVer. Common mistake.
parse
from semver4 import parse
from semver4.parser import parse (does not exist)
parse is a top-level function, not in a submodule.

Create, parse, compare, and bump semantic versions with an optional hotfix field.

from semver4 import Semver4, parse v = Semver4(major=1, minor=2, patch=3, hotfix=4) print(v) # 1.2.3+hotfix.4 v2 = parse('2.0.0') print(v2 > v) # True v3 = v.bump_patch() print(v3) # 1.2.4
Debug
Known issues
gotchaThe library is in beta (0.0.1b8) and the API may change. Do not rely on it in production without pinning the exact version.
fix
Pin to exact version in requirements: semver4==0.0.1b8
affects: <=0.0.1b8
breakingThe hotfix version is included in the string representation with a '+' delimiter, which differs from strict SemVer 2.0.0. Parsing with standard semver libraries will fail.
fix
Use semver4's own parsing functions for strings containing hotfix.
affects: >=0.0.1a1
deprecatedThe 'hotfix' concept is experimental and may be removed in a future stable release.
fix
Monitor the repo for updates if your use case depends on hotfix.
affects: >=0.0.1a1
Upgrade
Version history
0.0.1b8latest on PyPI · released Mar 24, 2024
Audit
Dependencies
typing_extensionsoptionalUsed for Self type hints in newer Python versions.
Agent activity
4 hits · last 30 days
node
4
Resources
semver4 — pip install semver4 · libregistry