Skip to main content

A version helper in the spirit of versioneer.

Project description

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.

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

get_version-3.5.5.tar.gz (17.4 kB view details)

Uploaded Source

Built Distribution

get_version-3.5.5-py3-none-any.whl (18.2 kB view details)

Uploaded Python 3

File details

Details for the file get_version-3.5.5.tar.gz.

File metadata

  • Download URL: get_version-3.5.5.tar.gz
  • Upload date:
  • Size: 17.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.5

File hashes

Hashes for get_version-3.5.5.tar.gz
Algorithm Hash digest
SHA256 3da062ef55b21dfcad798451e4c6372b00d16bf578701e61daa8e6371dd94e05
MD5 b6d02f1804b100820c6a55ce2ef32519
BLAKE2b-256 4766d16f1206000cd0fffed6eb506775f94f247c7c47a760cf0958a896bad57b

See more details on using hashes here.

Provenance

File details

Details for the file get_version-3.5.5-py3-none-any.whl.

File metadata

  • Download URL: get_version-3.5.5-py3-none-any.whl
  • Upload date:
  • Size: 18.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.5

File hashes

Hashes for get_version-3.5.5-py3-none-any.whl
Algorithm Hash digest
SHA256 a0748c95e846692a26f6ffb5858153c302519cc09e3c7397f7595f8d2a0d9997
MD5 31831267090b7814cebb2d2b18f5ba74
BLAKE2b-256 4a19bdf88598c77c5e6486ae4d0f6aa0877138ef6e267bfab0710a659075a2b2

See more details on using hashes here.

Provenance

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page