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
Built Distributions
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file app_version-1.0.1.tar.gz.
File metadata
- Download URL: app_version-1.0.1.tar.gz
- Upload date:
- Size: 11.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c21f6ea7e97092ba9a28dd6f884766647888273cbda8bde8f108f9657d5b4bff
|
|
| MD5 |
c134eb469b90f22f9502e98b8ba0e724
|
|
| BLAKE2b-256 |
7d071089c21119a1ea49326779d9e89dc57845a785f91cd52561f3492def4049
|
File details
Details for the file app_version-1.0.1-py3-none-any.whl.
File metadata
- Download URL: app_version-1.0.1-py3-none-any.whl
- Upload date:
- Size: 7.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c38bd6931565b9a972961ef19f1ab8aa80748d68c0153000116800b7ce5678a8
|
|
| MD5 |
29bef19f97e219f3a91eee806d44e4a8
|
|
| BLAKE2b-256 |
a7035eeff1025f889d8d85738078c4f48e806aafe27c93ed1a52f3fbec029b06
|
File details
Details for the file app_version-1.0.1-py2-none-any.whl.
File metadata
- Download URL: app_version-1.0.1-py2-none-any.whl
- Upload date:
- Size: 7.9 kB
- Tags: Python 2
- Uploaded using Trusted Publishing? No
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
aeecceebf20f0935dadeb4aa246a962c5d99b6ccba623b433d0c3952d0964a22
|
|
| MD5 |
8564310692a67b505dcaa2fd0cbf1c84
|
|
| BLAKE2b-256 |
ad25a53395b015c9eedee3f228397b25deae3037164ff2ead9b16da8a824783a
|