semver
Python helper for Semantic Versioning (https://semver.org)
Install
semver on PyPI
pip
pip install semveruv
uv add semverpoetry
poetry add semverPackage facts
| License | Copyright (c) 2013, Konstantine Rybnikov All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are… (full text in the JSON record) (permissive) |
| Python support | supports the current Python release (>=3.7) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | none |
| Maintenance | actively maintained — 566 days since the last release |
| Last repo commit | |
| First released | |
| Popularity | one of the top 1,000 most-downloaded packages on PyPI (30-day window, as of 2026-08-13) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-13) |
Evidence: semver-3.0.4-py3-none-any.whl
About semver
from the package's own PyPI description — quoted content, verbatim
Quickstart
.. teaser-begin
A Python module to simplify semantic versioning_.
|GHAction| |python-support| |downloads| |license| |docs| |black| |openissues| |GHDiscussion|
.. teaser-end
The module follows the MAJOR.MINOR.PATCH style:
MAJORversion when you make incompatible API changes,MINORversion when you add functionality in a backwards compatible manner, andPATCHversion when you make backwards compatible bug fixes.
Additional labels for pre-release and build metadata are supported.
To import this library, use:
.. code-block:: python
>>> import semver
Working with the library is quite straightforward. To turn a version string into the
different parts, use the semver.Version.parse function:
.. code-block:: python
>>> ver = semver.Version.parse('1.2.3-pre.2+build.4')
>>> ver.major
1
>>> ver.minor
2
>>> ver.patch
3
>>> ver.prerelease
'pre.2'
>>> ver.build
'build.4'
To raise parts of a version, there are a couple of functions available for
you. The function semver.Version.bump_major leaves the original object untouched, but
returns a new semver.Version instance with the...
AI interpretation — verify before relying
AI-generated interpretation of the package facts above; every digit, version, license, or vulnerability id it cites is grounded in the facts already shown on this page
Parses, compares, and manipulates semantic version strings following the MAJOR.MINOR.PATCH format, with support for pre-release and build metadata.
Installs with zero runtime dependencies and low friction. Actively maintained with a recent release (2025-01-24) and ongoing repository activity.
BSD 2-Clause permissive license allows commercial and private use with minimal restrictions; attribution and liability disclaimer required.
Usage
pip install semver==3.0.4
import semver
ver = semver.Version.parse('1.2.3')
ver.bump_major()
Verdict: A stable, zero-dependency semantic versioning utility in active maintenance with broad Python support (3.7–3.14) and no known vulnerabilities. Permissive BSD license and top-1000 popularity make it a low-risk choice for version handling.
Similar packages
permissive · top 1,000 on PyPI
vcrpypermissive · top 1,000 on PyPI
findpythonpermissive · top 1,000 on PyPI
ua-parserpermissive · top 1,000 on PyPI
poetrypermissive · top 1,000 on PyPI
grpciopermissive · top 100 on PyPI
elastic-transportpermissive · top 1,000 on PyPI
PyNaClpermissive · top 1,000 on PyPI
jupyter-serverpermissive · top 1,000 on PyPI
graphql-corepermissive · top 1,000 on PyPI