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.

Files for semver_range, version 0.0.3
Filename, size File type Python version Upload date Hashes
Filename, size semver_range-0.0.3-py3-none-any.whl (7.0 kB) File type Wheel Python version 3.7 Upload date Hashes View
Filename, size semver_range-0.0.3.tar.gz (6.1 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page