Flexible version handling
Actively maintained. Last release 7 weeks ago. A safe choice.
pip install inversioninversion
inversion is a Python library for handling software versions and specifiers,
adapted from the packaging package.
An Example
>>> from inversion import python
>>> v1 = python.Version('1.0')
>>> s1 = python.SpecifierSet('~=1.0')
>>> v1 in s1
True
>>> from inversion import loose
>>> v2 = loose.Version('1.0')
>>> s2 = loose.SpecifierSet('>=1.0')
>>> v2 in s2
True
Credits
The real credit for this package goes to the Python Packaging Authority.
License
This project is dual-licensed under the BSD and Apache licenses.