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

Uploaded Source

Built Distribution

get_version-2.1-py3-none-any.whl (43.1 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for get_version-2.1.tar.gz
Algorithm Hash digest
SHA256 8156b526c2557537b8ca82241fa2b82b3da25939627398f6567dee31ba9725bc
MD5 1ac0b965517d2650fe9c7218bbce5b48
BLAKE2b-256 ad73affebb1d86d847b3a80cd760ecffaeabc10350392afd87f2cfdd480e4140

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for get_version-2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 f5481b7b00bebf4cf52daa43510ef439be51b78665c4df29ad6088fcd7203382
MD5 79f8a248e7bc3cbbf23c5b85f35841fb
BLAKE2b-256 23487610e884e62fff2183e7bc8592397c39a020267fb5147905fcd3f9cc820c

See more details on using hashes here.

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