py3-semver

Python package to work with Semantic Versioning (https://semver.org/)

https://github.com/python-semver/python-semver

Science Score: 54.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
    Found CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
  • Committers with academic emails
    1 of 44 committers (2.3%) from academic institutions
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (12.5%) to scientific vocabulary

Keywords

python release semantic-version semantic-versioning semver semver-cli semver-format semver-release semver-tag version versioning versions

Keywords from Contributors

json-schema pydantic uvicorn swagger-ui starlette redoc python-types openapi3 asyncio python39
Last synced: 6 months ago · JSON representation ·

Repository

Python package to work with Semantic Versioning (https://semver.org/)

Basic Info
Statistics
  • Stars: 499
  • Watchers: 11
  • Forks: 98
  • Open Issues: 13
  • Releases: 21
Topics
python release semantic-version semantic-versioning semver semver-cli semver-format semver-release semver-tag version versioning versions
Created about 14 years ago · Last pushed 8 months ago
Metadata Files
Readme Changelog Contributing License Citation Support

README.rst

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 raised major part:

.. code-block:: python

    >>> ver = semver.Version.parse("3.4.5")
    >>> ver.bump_major()
    Version(major=4, minor=0, patch=0, prerelease=None, build=None)

It is allowed to concatenate different "bump functions":

.. code-block:: python

    >>> ver.bump_major().bump_minor()
    Version(major=4, minor=1, patch=0, prerelease=None, build=None)

To compare two versions, semver provides the ``semver.compare`` function.
The return value indicates the relationship between the first and second
version:

.. code-block:: python

    >>> semver.compare("1.0.0", "2.0.0")
    -1
    >>> semver.compare("2.0.0", "1.0.0")
    1
    >>> semver.compare("2.0.0", "2.0.0")
    0


There are other functions to discover. Read on!


.. |latest-version| image:: https://img.shields.io/pypi/v/semver.svg
   :alt: Latest version on PyPI
   :target: https://pypi.org/project/semver
.. |python-support| image:: https://img.shields.io/pypi/pyversions/semver.svg
   :target: https://pypi.org/project/semver
   :alt: Python versions
.. |downloads| image:: https://img.shields.io/pypi/dm/semver.svg
   :alt: Monthly downloads from PyPI
   :target: https://pypi.org/project/semver
.. |license| image:: https://img.shields.io/pypi/l/semver.svg
   :alt: Software license
   :target: https://github.com/python-semver/python-semver/blob/master/LICENSE.txt
.. |docs| image:: https://readthedocs.org/projects/python-semver/badge/?version=latest
   :target: http://python-semver.readthedocs.io/en/latest/?badge=latest
   :alt: Documentation Status
.. _semantic versioning: https://semver.org/
.. |black| image:: https://img.shields.io/badge/code%20style-black-000000.svg
    :target: https://github.com/psf/black
    :alt: Black Formatter
.. |Gitter| image:: https://badges.gitter.im/python-semver/community.svg
    :target: https://gitter.im/python-semver/community
    :alt: Gitter
.. |openissues| image:: http://isitmaintained.com/badge/open/python-semver/python-semver.svg
    :target: http://isitmaintained.com/project/python-semver/python-semver
    :alt: Percentage of open issues
.. |GHAction| image:: https://github.com/python-semver/python-semver/workflows/Python/badge.svg
    :alt: Python
.. |GHDiscussion| image:: https://shields.io/badge/GitHub-%20Discussions-green?logo=github
    :target: https://github.com/python-semver/python-semver/discussions
    :alt: GitHub Discussion

Owner

  • Name: Python semver org
  • Login: python-semver
  • Kind: organization

Citation (CITATION.cff)

# This CITATION.cff file was generated with cffinit:
# https://bit.ly/cffinit

cff-version: 1.2.0
title: python-semver
message: >-
  If you use this software, please cite it using the
  metadata from this file.
type: software

authors:
  - given-names: Kostiantyn
    family-names: Rybnikov
    email: k-bx@k-bx.com
  - given-names: Tom
    family-names: Schraitle
    email: tom_schr@web.de
  - given-names: Sebastian
    family-names: Celles
    email: s.celles@gmail.com
  - name: "The python-semver software team"

identifiers:
  - type: url
    value: 'https://github.com/python-semver/python-semver'
    description: GitHub python-semver/python-semver
url: 'https://python-semver.readthedocs.io'
repository-code: 'https://github.com/python-semver/python-semver'
repository-artifact: 'https://pypi.org/project/semver/'

abstract: >-
  A Python module for semantic versioning. Simplifies
  comparing versions. This modules follows the
  MAJOR.MINOR.PATCH style.

keywords:
  - Python
  - Python module
  - semver
  - versioning
  - semantic versioning
  - semver-format
  - semver-tag
  - versions

references:
  - authors:
    - family-names: Preston-Werner
      given-names: Tom
    - name: "The semver team"
    title: 'Semantic Versioning 2.0.0'
    url: 'https://semver.org'
    repository-code: 'https://github.com/semver/semver'
    type: standard
    version: 2.0.0
    languages:
      - ar
      - bg
      - ca
      - cs
      - da
      - de
      - el
      - en
      - es
      - fa
      - fr
      - he
      - hin
      - hr
      - hu
      - hy
      - id
      - it
      - ja
      - ka
      - kab
      - ko
      - nl
      - pl
      - pt
      - ro
      - ru
      - sk
      - sl
      - sr
      - sv
      - tr
      - uk
      - vi
      - zh
    abstract: >-
      Given a version number MAJOR.MINOR.PATCH, increment the:

      1. MAJOR version when you make incompatible API changes
      2. MINOR version when you add functionality in a backwards compatible manner
      3. PATCH version when you make backwards compatible bug fixes

      Additional labels for pre-release and build metadata are available as extensions to the MAJOR.MINOR.PATCH format.

license: BSD-3-Clause
commit: 3a7680dc436211227c0aeae84c9b45e0b3345b8f
version: 3.0.0
date-released: '2023-04-02'

GitHub Events

Total
  • Create event: 5
  • Release event: 1
  • Issues event: 16
  • Watch event: 30
  • Delete event: 3
  • Issue comment event: 51
  • Push event: 25
  • Pull request review comment event: 9
  • Pull request review event: 10
  • Pull request event: 20
  • Fork event: 3
Last Year
  • Create event: 5
  • Release event: 1
  • Issues event: 16
  • Watch event: 30
  • Delete event: 3
  • Issue comment event: 51
  • Push event: 25
  • Pull request review comment event: 9
  • Pull request review event: 10
  • Pull request event: 20
  • Fork event: 3

Committers

Last synced: 8 months ago

All Time
  • Total Commits: 371
  • Total Committers: 44
  • Avg Commits per committer: 8.432
  • Development Distribution Score (DDS): 0.509
Past Year
  • Commits: 16
  • Committers: 5
  • Avg Commits per committer: 3.2
  • Development Distribution Score (DDS): 0.25
Top Committers
Name Email Commits
Tom Schraitle t****r 182
Kostiantyn Rybnikov k****x@k****m 54
Ben Finney b****n@b****u 26
scls19fr s****r 20
Alexander Shorin k****l@g****m 16
Peter Bittner d****o@b****t 12
Karol Werner k****l@p****u 9
Thomas Laferriere t****e@h****a 6
ofek o****r@g****m 3
T. Jameson Little t****e@g****m 3
Craig Blaszczyk m****l@g****m 3
Tyler Cross t****r@c****m 3
Alexander Grund F****e 2
robi-wan r****n@s****e 2
Jelo Agnasin j****o@i****m 1
Alexander Böhn f****0 1
Alexander Puzynia w****y@g****m 1
Anton Talevnin T****R 1
Apiwat Chantawibul b****a@g****m 1
Benjamin K 5****1 1
Carles Barrobés c****s@b****m 1
Carlo c****i 1
Zain Patel z****l@q****m 1
Zack Lalanne z****e@g****m 1
Waket Zheng w****g@g****m 1
Victor Westerhuis v****s@a****m 1
Tuure Laurinolli t****e@l****t 1
Thomas 6****h 1
Piper Merriam p****m@g****m 1
Philip Blair p****n@g****m 1
and 14 more...

Issues and Pull Requests

Last synced: 6 months ago

All Time
  • Total issues: 59
  • Total pull requests: 95
  • Average time to close issues: 6 months
  • Average time to close pull requests: 29 days
  • Total issue authors: 39
  • Total pull request authors: 21
  • Average comments per issue: 4.61
  • Average comments per pull request: 1.43
  • Merged pull requests: 81
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 6
  • Pull requests: 15
  • Average time to close issues: 5 days
  • Average time to close pull requests: 6 days
  • Issue authors: 6
  • Pull request authors: 3
  • Average comments per issue: 6.0
  • Average comments per pull request: 0.73
  • Merged pull requests: 12
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • tomschr (17)
  • fleetingbytes (4)
  • tlaferriere (3)
  • libinmv (1)
  • vincent-herlemont (1)
  • apiwat-chantawibul (1)
  • Soneji (1)
  • hokreb (1)
  • apirogov (1)
  • nieder (1)
  • viccie30 (1)
  • deviumgroup (1)
  • KCSesh (1)
  • cariad (1)
  • KitBurgess (1)
Pull Request Authors
  • tomschr (71)
  • fleetingbytes (4)
  • jbkroner (2)
  • dschwoerer (2)
  • viccie30 (2)
  • Learloj (2)
  • frenzymadness (1)
  • zanecodes (1)
  • jmi2k (1)
  • treee111 (1)
  • calebstewart (1)
  • mssalvatore (1)
  • apiwat-chantawibul (1)
  • mzjp2 (1)
  • def- (1)
Top Labels
Issue Labels
Enhancement (18) Release_3.x.y (16) Question (13) Bug (10) Infra (10) Wontfix (8) Design (4) Doc (4) Release_2.x.y (2) Duplicate (1) Not Semver (1) NoResponse (1) Release_4.x.y (1)
Pull Request Labels
Enhancement (32) Infra (24) Release_3.x.y (18) Bug (15) Doc (14) Design (1) Wontfix (1)

Packages

  • Total packages: 15
  • Total downloads:
    • pypi 52,521,320 last-month
  • Total docker downloads: 1,202,519,580
  • Total dependent packages: 568
    (may contain duplicates)
  • Total dependent repositories: 7,406
    (may contain duplicates)
  • Total versions: 71
  • Total maintainers: 4
pypi.org: semver

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

  • Documentation: https://python-semver.rtfd.io
  • 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 met: Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. Neither the name of the python-semver org nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  • Latest release: 3.0.4
    published about 1 year ago
  • Versions: 47
  • Dependent Packages: 565
  • Dependent Repositories: 7,406
  • Downloads: 52,521,320 Last month
  • Docker Downloads: 1,202,519,580
Rankings
Docker downloads count: 0.0%
Dependent packages count: 0.0%
Downloads: 0.1%
Dependent repos count: 0.1%
Average: 1.6%
Stargazers count: 4.0%
Forks count: 5.3%
Maintainers (3)
Last synced: 6 months ago
alpine-v3.18: py3-semver

Python package to work with Semantic Versioning

  • Versions: 1
  • Dependent Packages: 0
  • Dependent Repositories: 0
Rankings
Dependent repos count: 0.0%
Dependent packages count: 0.0%
Average: 6.2%
Forks count: 11.9%
Stargazers count: 12.9%
Maintainers (1)
Last synced: 6 months ago
alpine-v3.18: py3-semver-pyc

Precompiled Python bytecode for py3-semver

  • Versions: 1
  • Dependent Packages: 0
  • Dependent Repositories: 0
Rankings
Dependent repos count: 0.0%
Dependent packages count: 0.0%
Average: 6.2%
Forks count: 11.9%
Stargazers count: 12.9%
Maintainers (1)
Last synced: 6 months ago
alpine-edge: py3-semver

Python package to work with Semantic Versioning

  • Versions: 7
  • Dependent Packages: 1
  • Dependent Repositories: 0
Rankings
Dependent repos count: 0.0%
Dependent packages count: 6.0%
Average: 8.3%
Forks count: 12.9%
Stargazers count: 14.2%
Maintainers (1)
Last synced: 6 months ago
alpine-edge: py3-semver-pyc

Precompiled Python bytecode for py3-semver

  • Versions: 5
  • Dependent Packages: 0
  • Dependent Repositories: 0
Rankings
Dependent repos count: 0.0%
Average: 10.3%
Forks count: 13.2%
Dependent packages count: 13.3%
Stargazers count: 14.8%
Maintainers (1)
Last synced: 6 months ago
alpine-v3.16: py3-semver

Python package to work with Semantic Versioning

  • Versions: 1
  • Dependent Packages: 2
  • Dependent Repositories: 0
Rankings
Dependent repos count: 0.0%
Forks count: 9.3%
Stargazers count: 9.8%
Average: 11.6%
Dependent packages count: 27.3%
Maintainers (1)
Last synced: 6 months ago
alpine-v3.17: py3-semver

Python package to work with Semantic Versioning

  • Versions: 1
  • Dependent Packages: 0
  • Dependent Repositories: 0
Rankings
Dependent repos count: 0.0%
Forks count: 11.2%
Stargazers count: 12.1%
Average: 12.6%
Dependent packages count: 27.3%
Maintainers (1)
Last synced: 6 months ago
alpine-v3.20: py3-semver

Python package to work with Semantic Versioning

  • Versions: 1
  • Dependent Packages: 0
  • Dependent Repositories: 0
Rankings
Dependent repos count: 0.0%
Dependent packages count: 0.0%
Average: 100%
Maintainers (1)
Last synced: 6 months ago
alpine-v3.21: py3-semver

Python package to work with Semantic Versioning

  • Versions: 1
  • Dependent Packages: 0
  • Dependent Repositories: 0
Rankings
Dependent repos count: 0.0%
Dependent packages count: 0.0%
Average: 100%
Maintainers (1)
Last synced: 6 months ago
alpine-v3.22: py3-semver-pyc

Precompiled Python bytecode for py3-semver

  • Versions: 1
  • Dependent Packages: 0
  • Dependent Repositories: 0
Rankings
Dependent repos count: 0.0%
Dependent packages count: 0.0%
Average: 100%
Maintainers (1)
Last synced: 6 months ago
alpine-v3.21: py3-semver-pyc

Precompiled Python bytecode for py3-semver

  • Versions: 1
  • Dependent Packages: 0
  • Dependent Repositories: 0
Rankings
Dependent repos count: 0.0%
Dependent packages count: 0.0%
Average: 100%
Maintainers (1)
Last synced: 6 months ago
alpine-v3.20: py3-semver-pyc

Precompiled Python bytecode for py3-semver

  • Versions: 1
  • Dependent Packages: 0
  • Dependent Repositories: 0
Rankings
Dependent repos count: 0.0%
Dependent packages count: 0.0%
Average: 100%
Maintainers (1)
Last synced: 6 months ago
alpine-v3.22: py3-semver

Python package to work with Semantic Versioning

  • Versions: 1
  • Dependent Packages: 0
  • Dependent Repositories: 0
Rankings
Dependent repos count: 0.0%
Dependent packages count: 0.0%
Average: 100%
Maintainers (1)
Last synced: 6 months ago
alpine-v3.19: py3-semver-pyc

Precompiled Python bytecode for py3-semver

  • Versions: 1
  • Dependent Packages: 0
  • Dependent Repositories: 0
Rankings
Dependent repos count: 0.0%
Dependent packages count: 0.0%
Average: 100%
Maintainers (1)
Last synced: 6 months ago
alpine-v3.19: py3-semver

Python package to work with Semantic Versioning

  • Versions: 1
  • Dependent Packages: 0
  • Dependent Repositories: 0
Rankings
Dependent repos count: 0.0%
Dependent packages count: 0.0%
Average: 100%
Maintainers (1)
Last synced: 6 months ago

Dependencies

.github/workflows/codeql-analysis.yml actions
  • actions/checkout v3 composite
  • github/codeql-action/analyze v2 composite
  • github/codeql-action/autobuild v2 composite
  • github/codeql-action/init v2 composite
.github/workflows/python-testing.yml actions
  • actions/checkout v3 composite
  • actions/setup-python v3 composite
  • actions/setup-python v4 composite
docs/requirements.txt pypi
  • sphinx-argparse *
  • sphinx-autodoc-typehints *
pyproject.toml pypi
uv.lock pypi
  • alabaster 0.7.13
  • babel 2.14.0
  • black 23.3.0
  • bleach 6.0.0
  • build 1.1.1
  • cachetools 5.5.0
  • certifi 2024.8.30
  • cffi 1.15.1
  • chardet 5.2.0
  • charset-normalizer 3.4.0
  • click 8.1.7
  • click-default-group 1.2.4
  • colorama 0.4.6
  • coverage 7.2.7
  • cryptography 43.0.3
  • distlib 0.3.9
  • docformatter 1.7.5
  • docutils 0.19
  • exceptiongroup 1.2.2
  • filelock 3.12.2
  • idna 3.10
  • imagesize 1.4.1
  • importlib-metadata 6.7.0
  • importlib-resources 5.12.0
  • incremental 22.10.0
  • iniconfig 2.0.0
  • jaraco-classes 3.2.3
  • jeepney 0.8.0
  • jinja2 3.1.4
  • keyring 24.1.1
  • markdown-it-py 2.2.0
  • markupsafe 2.1.5
  • mdurl 0.1.2
  • more-itertools 9.1.0
  • mypy 1.4.1
  • mypy-extensions 1.0.0
  • nodeenv 1.9.1
  • packaging 24.0
  • pathspec 0.11.2
  • pkginfo 1.10.0
  • platformdirs 4.0.0
  • pluggy 1.2.0
  • pycparser 2.21
  • pygments 2.17.2
  • pyproject-api 1.5.3
  • pyproject-hooks 1.2.0
  • pyright 1.1.387
  • pytest 7.4.4
  • pytest-cov 4.1.0
  • pytz 2024.2
  • pywin32-ctypes 0.2.3
  • readme-renderer 36.0
  • requests 2.31.0
  • requests-toolbelt 1.0.0
  • restview 3.0.2
  • rfc3986 2.0.0
  • rich 13.8.1
  • ruff 0.7.2
  • secretstorage 3.3.3
  • semver *
  • six 1.16.0
  • snowballstemmer 2.2.0
  • sphinx 5.3.0
  • sphinx-argparse 0.4.0
  • sphinx-autodoc-typehints 1.23.0
  • sphinxcontrib-applehelp 1.0.2
  • sphinxcontrib-devhelp 1.0.2
  • sphinxcontrib-htmlhelp 2.0.0
  • sphinxcontrib-jsmath 1.0.1
  • sphinxcontrib-qthelp 1.0.3
  • sphinxcontrib-serializinghtml 1.1.5
  • tomli 2.0.1
  • towncrier 23.6.0
  • tox 4.8.0
  • tox-gh-actions 3.2.0
  • twine 4.0.2
  • typed-ast 1.5.5
  • typing-extensions 4.7.1
  • untokenize 0.1.1
  • urllib3 2.0.7
  • virtualenv 20.26.6
  • webencodings 0.5.1
  • zipp 3.15.0