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

Uploaded Source

Built Distribution

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

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for get_version-3.5.3.tar.gz
Algorithm Hash digest
SHA256 b1a9931b8a9c06f3b7bc77ac61fe89a5f29c4d88ece2653f3f28bf2f2914af04
MD5 975f2ea4a7ecf8f0bcd57c046b745934
BLAKE2b-256 09ee2afc52bcf8c8deb9c83070fdb430abfa809e6be8a642b71ae5b4ec696625

See more details on using hashes here.

Provenance

File details

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

File metadata

File hashes

Hashes for get_version-3.5.3-py3-none-any.whl
Algorithm Hash digest
SHA256 7a6903db2da84fa3b38a0185bed7ea55a804a087a846680edc1a5df66dce0491
MD5 c4c725ab9c0fac7c88d9d0e1ddcbd714
BLAKE2b-256 47bbc231518678571c656a2f5e958ed1c0f7cd870518471631b661675e1806c6

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