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

Uploaded Source

Built Distribution

get_version-2.2-py3-none-any.whl (16.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: get_version-2.2.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-2.2.tar.gz
Algorithm Hash digest
SHA256 ceca165b0cbbee1e92d41f711508fe6648a51dc8d5248f777e0e7a8bc22d89c8
MD5 c3dfd243e1230539b2bc0bb175aaba4d
BLAKE2b-256 57a06805ce62dea54dc2d3f2c77004e2304273e41d45ad703d6cc6a6fb50a946

See more details on using hashes here.

Provenance

File details

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

File metadata

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

File hashes

Hashes for get_version-2.2-py3-none-any.whl
Algorithm Hash digest
SHA256 5bfe61d334964a0d44da2e2002bd1ada50df3a5d767993b8faa6888590f5c726
MD5 5046ddb031afaf5621014dac4ec578f1
BLAKE2b-256 30a697f1c2cdaae1355f79d24264d3ddbcbb6ba670f5994c5997b688d5cd10e5

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