Skip to main content
Help us improve PyPI by participating in user testing. All experience levels needed!

A tiny utility to get application version from pkg_resouces

Project description

Build status Coverage Requirements Status Version License Format Supported python versions Status

Do you write the version information on setup.py and __init__.py?

This tiny application allow you to access version information of setup.py from __init__.py.

Based on this post, I wrote this tiny application for convinience.

Check online documentation for more details.

Installation

Use pip like:

$ pip install app_version

Usage

The following code is an example __init__.py.

from app_version import get_versions
__version__, VERSION = get_versions('your app name')

Then you can access the version string with __version__ and version tuple with VERSION. The version tuple is useful for comparing versions like

>>> VERSION = (0, 1, 2)
>>> VERSION > (0, 1, 0)
True
>>> VERSION > (0, 1, 1)
True
>>> VERSION > (0, 1, 2)
False

Project details


Release history Release notifications

This version
History Node

1.0.1

History Node

1.0.0

History Node

0.2.1

History Node

0.2.0

History Node

0.1.2

History Node

0.1.1

History Node

0.1.0

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Filename, size & hash SHA256 hash help File type Python version Upload date
app_version-1.0.1-py2-none-any.whl (7.9 kB) Copy SHA256 hash SHA256 Wheel py2 Jul 14, 2017
app_version-1.0.1-py3-none-any.whl (7.9 kB) Copy SHA256 hash SHA256 Wheel py3 Jul 14, 2017
app_version-1.0.1.tar.gz (11.2 kB) Copy SHA256 hash SHA256 Source None Jul 14, 2017

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging CloudAMQP CloudAMQP RabbitMQ AWS AWS Cloud computing Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page