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

Uploaded Source

Built Distribution

get_version-3.4-py3-none-any.whl (17.1 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for get_version-3.4.tar.gz
Algorithm Hash digest
SHA256 7ad2379fbbae6ce986391c2e355d54416b0a2318d8bd372aad04ff43cfa17949
MD5 9f24d9b0ed9b38c1b51a12c676504f77
BLAKE2b-256 b02cb7c2eb302143dc609e1bf82ef69aaae726f448ea68e3757bc1f204a62958

See more details on using hashes here.

Provenance

File details

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

File metadata

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

File hashes

Hashes for get_version-3.4-py3-none-any.whl
Algorithm Hash digest
SHA256 ea23b470a764c6d0cde4ec540414c5b6a03b9ca2fb176f694b38bea4690a2035
MD5 40f781fd69138d9de9736a91765b371f
BLAKE2b-256 807a7af1deca2c3df26600eae5b773ed0025b7cfd54716e5538d40483e696c85

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