{"id":13635130,"url":"https://github.com/python-semver/python-semver","last_synced_at":"2025-12-12T01:05:38.116Z","repository":{"id":2408110,"uuid":"3375726","full_name":"python-semver/python-semver","owner":"python-semver","description":"Python package to work with Semantic Versioning (https://semver.org/)","archived":false,"fork":false,"pushed_at":"2025-01-28T12:40:12.000Z","size":902,"stargazers_count":490,"open_issues_count":15,"forks_count":96,"subscribers_count":11,"default_branch":"master","last_synced_at":"2025-04-25T18:21:51.550Z","etag":null,"topics":["python","release","semantic-version","semantic-versioning","semver","semver-cli","semver-format","semver-release","semver-tag","version","versioning","versions"],"latest_commit_sha":null,"homepage":"https://python-semver.readthedocs.io/en/latest/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/python-semver.png","metadata":{"files":{"readme":"README.rst","changelog":"CHANGELOG.rst","contributing":"CONTRIBUTING.rst","funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":"CITATION.cff","codeowners":null,"security":null,"support":"SUPPORT.md","governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2012-02-07T08:46:16.000Z","updated_at":"2025-04-24T16:02:28.000Z","dependencies_parsed_at":"2025-02-07T14:00:38.653Z","dependency_job_id":"6af531a0-7718-4f0c-ab90-faf1b38ea29c","html_url":"https://github.com/python-semver/python-semver","commit_stats":{"total_commits":362,"total_committers":43,"mean_commits":8.418604651162791,"dds":0.5994475138121547,"last_synced_commit":"8daa5716f6717360c9f48d14aac8f0ad9ea69520"},"previous_names":["k-bx/python-semver"],"tags_count":34,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/python-semver%2Fpython-semver","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/python-semver%2Fpython-semver/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/python-semver%2Fpython-semver/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/python-semver%2Fpython-semver/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/python-semver","download_url":"https://codeload.github.com/python-semver/python-semver/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250869859,"owners_count":21500391,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["python","release","semantic-version","semantic-versioning","semver","semver-cli","semver-format","semver-release","semver-tag","version","versioning","versions"],"created_at":"2024-08-02T00:00:41.125Z","updated_at":"2025-12-12T01:05:38.074Z","avatar_url":"https://github.com/python-semver.png","language":"Python","readme":"Quickstart\n==========\n\n.. teaser-begin\n\nA Python module to simplify `semantic versioning`_.\n\n|GHAction| |python-support| |downloads| |license| |docs| |black|\n|openissues| |GHDiscussion|\n\n.. teaser-end\n\nThe module follows the ``MAJOR.MINOR.PATCH`` style:\n\n* ``MAJOR`` version when you make incompatible API changes,\n* ``MINOR`` version when you add functionality in a backwards compatible manner, and\n* ``PATCH`` version when you make backwards compatible bug fixes.\n\nAdditional labels for pre-release and build metadata are supported.\n\nTo import this library, use:\n\n.. code-block:: python\n\n    \u003e\u003e\u003e import semver\n\nWorking with the library is quite straightforward. To turn a version string into the\ndifferent parts, use the ``semver.Version.parse`` function:\n\n.. code-block:: python\n\n    \u003e\u003e\u003e ver = semver.Version.parse('1.2.3-pre.2+build.4')\n    \u003e\u003e\u003e ver.major\n    1\n    \u003e\u003e\u003e ver.minor\n    2\n    \u003e\u003e\u003e ver.patch\n    3\n    \u003e\u003e\u003e ver.prerelease\n    'pre.2'\n    \u003e\u003e\u003e ver.build\n    'build.4'\n\nTo raise parts of a version, there are a couple of functions available for\nyou. The function ``semver.Version.bump_major`` leaves the original object untouched, but\nreturns a new ``semver.Version`` instance with the raised major part:\n\n.. code-block:: python\n\n    \u003e\u003e\u003e ver = semver.Version.parse(\"3.4.5\")\n    \u003e\u003e\u003e ver.bump_major()\n    Version(major=4, minor=0, patch=0, prerelease=None, build=None)\n\nIt is allowed to concatenate different \"bump functions\":\n\n.. code-block:: python\n\n    \u003e\u003e\u003e ver.bump_major().bump_minor()\n    Version(major=4, minor=1, patch=0, prerelease=None, build=None)\n\nTo compare two versions, semver provides the ``semver.compare`` function.\nThe return value indicates the relationship between the first and second\nversion:\n\n.. code-block:: python\n\n    \u003e\u003e\u003e semver.compare(\"1.0.0\", \"2.0.0\")\n    -1\n    \u003e\u003e\u003e semver.compare(\"2.0.0\", \"1.0.0\")\n    1\n    \u003e\u003e\u003e semver.compare(\"2.0.0\", \"2.0.0\")\n    0\n\n\nThere are other functions to discover. Read on!\n\n\n.. |latest-version| image:: https://img.shields.io/pypi/v/semver.svg\n   :alt: Latest version on PyPI\n   :target: https://pypi.org/project/semver\n.. |python-support| image:: https://img.shields.io/pypi/pyversions/semver.svg\n   :target: https://pypi.org/project/semver\n   :alt: Python versions\n.. |downloads| image:: https://img.shields.io/pypi/dm/semver.svg\n   :alt: Monthly downloads from PyPI\n   :target: https://pypi.org/project/semver\n.. |license| image:: https://img.shields.io/pypi/l/semver.svg\n   :alt: Software license\n   :target: https://github.com/python-semver/python-semver/blob/master/LICENSE.txt\n.. |docs| image:: https://readthedocs.org/projects/python-semver/badge/?version=latest\n   :target: http://python-semver.readthedocs.io/en/latest/?badge=latest\n   :alt: Documentation Status\n.. _semantic versioning: https://semver.org/\n.. |black| image:: https://img.shields.io/badge/code%20style-black-000000.svg\n    :target: https://github.com/psf/black\n    :alt: Black Formatter\n.. |Gitter| image:: https://badges.gitter.im/python-semver/community.svg\n    :target: https://gitter.im/python-semver/community\n    :alt: Gitter\n.. |openissues| image:: http://isitmaintained.com/badge/open/python-semver/python-semver.svg\n    :target: http://isitmaintained.com/project/python-semver/python-semver\n    :alt: Percentage of open issues\n.. |GHAction| image:: https://github.com/python-semver/python-semver/workflows/Python/badge.svg\n    :alt: Python\n.. |GHDiscussion| image:: https://shields.io/badge/GitHub-%20Discussions-green?logo=github\n    :target: https://github.com/python-semver/python-semver/discussions\n    :alt: GitHub Discussion\n","funding_links":[],"categories":["Parsers/evaluators"],"sub_categories":["Python"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpython-semver%2Fpython-semver","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpython-semver%2Fpython-semver","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpython-semver%2Fpython-semver/lists"}