Make comparing version strings super simple.
Project description
verstr
Make comparing version strings super simple.
Quick start
If you want to check that a code use the appropriate version of your package as easy as:
# user_code.py
import my_package
assert my_package.__version__ >= "1.1"
You can custom your package as follows:
# my_package/__init__.py
import verstr
__version__ = verstr.verstr("1.2.4")
or, if you are using setuptools_scm
:
# my_package/__init__.py
import verstr
try:
from . import _version
__version__ = verstr.verstr(_version.version)
except ImportError:
__version__ = None
Installation
Install verstr
with pip
pip install verstr
Contributing
You are welcome to help the project, see how.
License
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
verstr-0.0.1a7.tar.gz
(4.0 kB
view hashes)