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.2.tar.gz (19.5 kB view details)

Uploaded Source

Built Distribution

get_version-3.5.2-py3-none-any.whl (18.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: get_version-3.5.2.tar.gz
  • Upload date:
  • Size: 19.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: python-requests/2.26.0

File hashes

Hashes for get_version-3.5.2.tar.gz
Algorithm Hash digest
SHA256 9a882091121f182c1c2b920549b4806a6eb90bc008b72d5925f3b99cd7fa4cb2
MD5 e61c995daac1ad3f30ce882c419f7fe2
BLAKE2b-256 e661c2af6d8bdc043b8772d87e0ee35c763ac6cd0b1c15c85605ead5768528d9

See more details on using hashes here.

Provenance

File details

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

File metadata

File hashes

Hashes for get_version-3.5.2-py3-none-any.whl
Algorithm Hash digest
SHA256 08584badece1704b250aefaf0bff1b383631154f8bd14c2fcb10595db1ebe8c5
MD5 61116976cf5297235f9ddf854268a3e8
BLAKE2b-256 2fb878ce4ca8cfba31ba95cb56b1c7a329687bd45fdb8f7c4615c9f05b7c7313

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