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

Uploaded Source

Built Distribution

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

Uploaded Python 3

File details

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

File metadata

  • Download URL: get_version-3.5.1.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.1.tar.gz
Algorithm Hash digest
SHA256 8451d3e992b48ef594cb6aa7ddfe01ed509a4d81249155de8c6527e107fce901
MD5 1d05b04508df92ee36a257ed0b65c72a
BLAKE2b-256 23d03ce296a944a2935d65b54884b6f54d0c255545b751aeb6e3d355a5b54258

See more details on using hashes here.

Provenance

File details

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

File metadata

File hashes

Hashes for get_version-3.5.1-py3-none-any.whl
Algorithm Hash digest
SHA256 ef059649fc985c9317805975031aced6eadd7f8f3316813bbf1fed6b0d3dbadc
MD5 672c4210b89fff3092adccf273e340e3
BLAKE2b-256 9b6ac0e0c7d25e74a621afd61429510314c2df795ec212c787cd4709bd09bbf1

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