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 pkg_resources (part of setuptools).

usage

Add setuptools to the dependencies of your package, and 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.1.tar.gz (17.5 kB view details)

Uploaded Source

Built Distribution

get_version-3.1-py3-none-any.whl (16.0 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for get_version-3.1.tar.gz
Algorithm Hash digest
SHA256 d749b1b085f8f378c7e12e3d9b5a07581d8520440889c06b51c52ad717297882
MD5 d60f62aa18ec6d7e917c04c769f2c23e
BLAKE2b-256 8c80638c30d0a946f8e9b356fb2294c81e5c574852bd4f261329ef48154363d1

See more details on using hashes here.

Provenance

File details

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

File metadata

  • Download URL: get_version-3.1-py3-none-any.whl
  • Upload date:
  • Size: 16.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: python-requests/2.25.1

File hashes

Hashes for get_version-3.1-py3-none-any.whl
Algorithm Hash digest
SHA256 168f5a19709dc6e0f864495728f3807ca84f652f335e82bba6a000e4dc0c7c26
MD5 bcb1469ba45295f7403903e6a91ce6bf
BLAKE2b-256 3185b40de1adf9175695549ca9502be1c4699f42d7746b01f8a7b4594bec4efe

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