Automatically use the latest “vX.X.X” Git tag as version in your Python package.
It also supports getting the version from Python source distributions (sdist) or, once your package is installed, via importlib.metadata.
usage
Add the following into yourpackage.py (or __init__.py):
from get_version import get_version
__version__ = get_version(__file__)
del get_version
contributing
Use black . to ensure proper code style. In order to not forget you can use pre-commit install.
Metadata
Release files for get-version 3.5.5
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| get_version-3.5.5.tar.gz | 17.4 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| get_version-3.5.5-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 35.5 kB
Release files / get_version-3.5.5.tar.gz
| Download URL | get_version-3.5.5.tar.gz |
|---|---|
| Size | 17.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
3da062ef55b21dfcad798451e4c6372b00d16bf578701e61daa8e6371dd94e05
|
|
BLAKE2b-256 checksum How to use checksums |
4766d16f1206000cd0fffed6eb506775f94f247c7c47a760cf0958a896bad57b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.11.5
|
Release files / get_version-3.5.5-py3-none-any.whl
| Download URL | get_version-3.5.5-py3-none-any.whl |
|---|---|
| Size | 18.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
a0748c95e846692a26f6ffb5858153c302519cc09e3c7397f7595f8d2a0d9997
|
|
BLAKE2b-256 checksum How to use checksums |
4a19bdf88598c77c5e6486ae4d0f6aa0877138ef6e267bfab0710a659075a2b2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.11.5
|