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
Release files for app_version 1.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| app_version-1.0.1.tar.gz | 11.2 kB | Details |
Built distributions (wheels)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| app_version-1.0.1-py3-none-any.whl | Python 3 | none | any | Details |
| app_version-1.0.1-py2-none-any.whl | Python 2 | none | any | Details |
Total release size: 26.9 kB
Release files / app_version-1.0.1.tar.gz
| Download URL | app_version-1.0.1.tar.gz |
|---|---|
| Size | 11.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c21f6ea7e97092ba9a28dd6f884766647888273cbda8bde8f108f9657d5b4bff
|
|
BLAKE2b-256 checksum How to use checksums |
7d071089c21119a1ea49326779d9e89dc57845a785f91cd52561f3492def4049
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Release files / app_version-1.0.1-py3-none-any.whl
| Download URL | app_version-1.0.1-py3-none-any.whl |
|---|---|
| Size | 7.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
c38bd6931565b9a972961ef19f1ab8aa80748d68c0153000116800b7ce5678a8
|
|
BLAKE2b-256 checksum How to use checksums |
a7035eeff1025f889d8d85738078c4f48e806aafe27c93ed1a52f3fbec029b06
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Release files / app_version-1.0.1-py2-none-any.whl
| Download URL | app_version-1.0.1-py2-none-any.whl |
|---|---|
| Size | 7.9 kB |
| Tags | Python 2 |
|
SHA-256 checksum How to use checksums |
aeecceebf20f0935dadeb4aa246a962c5d99b6ccba623b433d0c3952d0964a22
|
|
BLAKE2b-256 checksum How to use checksums |
ad25a53395b015c9eedee3f228397b25deae3037164ff2ead9b16da8a824783a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |