skillfed

semver

Python helper for Semantic Versioning (https://semver.org)

semver Permissive 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) Active 520 v3.0.4 released

Install

semver on PyPI

pip

pip install semver

uv

uv add semver

poetry

poetry add semver

Package 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

Development Status :: 5 - Production/StableEnvironment :: Web EnvironmentIntended Audience :: DevelopersLicense :: OSI Approved :: BSD LicenseOperating System :: OS IndependentProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Programming Language :: Python :: 3.7Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9Topic :: Software Development :: Libraries :: Python Modules

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:

  • MAJOR version when you make incompatible API changes,
  • MINOR version when you add functionality in a backwards compatible manner, and
  • PATCH version 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...

Read as markdown · JSON record · Source repository · Docs

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.

semantic versioningversion parsingversion comparisonsemver libraryversion bumpingversion string parsingsemver compliance

Similar packages