A tiny utility to get application version from pkg_resouces
Project description
Do you write the version information on setup.py and __init__.py?
This tiny application allow you to access version information of setup.py from __init__.py.
Based on this post, I wrote this tiny application for convinience.
Check online documentation for more details.
Installation
Use pip like:
$ pip install app_version
Usage
The following code is an example __init__.py.
from app_version import get_versions
__version__, VERSION = get_versions('your app name')
Then you can access the version string with __version__ and version tuple with VERSION. The version tuple is useful for comparing versions like
>>> VERSION = (0, 1, 2)
>>> VERSION > (0, 1, 0)
True
>>> VERSION > (0, 1, 1)
True
>>> VERSION > (0, 1, 2)
False
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
app_version-1.0.1.tar.gz
(11.2 kB
view hashes)
Built Distributions
Close
Hashes for app_version-1.0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c38bd6931565b9a972961ef19f1ab8aa80748d68c0153000116800b7ce5678a8 |
|
MD5 | 29bef19f97e219f3a91eee806d44e4a8 |
|
BLAKE2b-256 | a7035eeff1025f889d8d85738078c4f48e806aafe27c93ed1a52f3fbec029b06 |
Close
Hashes for app_version-1.0.1-py2-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | aeecceebf20f0935dadeb4aa246a962c5d99b6ccba623b433d0c3952d0964a22 |
|
MD5 | 8564310692a67b505dcaa2fd0cbf1c84 |
|
BLAKE2b-256 | ad25a53395b015c9eedee3f228397b25deae3037164ff2ead9b16da8a824783a |