Convert between semver range and maven version range
Project description
unified-range
Based on the VersionRange model and spec of maven.
Library to convert semver ranges to unified-range and the over way around. Currently only supported for comparator semver ranges.
Install
- Use pipenv
pipenv install unified-range
or
- Use pip directly
pip install unified-range
How to use
- Import the api module:
from unified_range import api
- Convert from semver to the unified range (return VersionRange object):
ver_rng = api.from_semver(semver_str)
- To get the string representation of a VersionRange object:
version_range_str = str(ver_rng)
- Convert from unified spec to semver_str (return str):
semver = api.to_semver(unified_spec_str)
- Convert from spec string to VersionRange objects:
ver_rng = api.unified_range(unified_spec_str)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
unified_range-0.0.4.tar.gz
(4.7 kB
view hashes)
Built Distribution
Close
Hashes for unified_range-0.0.4-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1d7081645dc999699bc3001c562c05b8c74f748b57d495ae8d7acdbb2fdce52d |
|
MD5 | 80009fad9add4a2f6522ef3a6ac725da |
|
BLAKE2b-256 | 59eff3a3d811ba483bba052fae0251fdbf277eed05aabd39af0843b0ae3d99ef |