Skip to main content

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)

Source distribution for get-version 3.5.5
File Size Uploaded
get_version-3.5.5.tar.gz 17.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for get-version 3.5.5
File Interpreter ABI Platform
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

Release history Release notifications | RSS feed

This release

3.5.5 This release

2 release files

3.5.4

2 release files

3.5.3

2 release files

3.5.2

2 release files

3.5.1

2 release files

3.5

2 release files

3.4

2 release files

3.3

2 release files

3.2

2 release files

3.1

2 release files

3.0

2 release files

2.2

2 release files

2.1

2 release files

2.0.6

2 release files

2.0.5

2 release files

2.0.4

2 release files

2.0.3

2 release files

2.0.2

2 release files

2.0.1

2 release files

2.0.0

2 release files

1.0.0

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page