Skip to main content

Python package that mimics npm’s “semver” package

Project description

Python package for semantic versioning 2.0.0 that mimics the node semver package. The interface is designed to be more “pythonic” and does not match semver’s logic 100%.

https://github.com/ushkarev/semver_range/workflows/Test%20semver_range/badge.svg

Usage

Install using pip install semver_range. Sample usage:

>>> from semver_range import Version, Range
>>> version_range = Range('>=0.1.1 <0.3.0')
>>> Version('0.2.2') in version_range
True
>>> version_range.highest_version(['0.1.1', '0.2.0', '0.3.0'])
<Version "0.2.0">

Alternatives

semantic_version is a great package which differs slightly in its implementation of semantic versioning, for example when incrementing a minor version of a pre-release.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

semver_range-0.0.3.tar.gz (6.1 kB view hashes)

Uploaded Source

Built Distribution

semver_range-0.0.3-py3-none-any.whl (7.0 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page