Skip to main content
Join the official 2019 Python Developers SurveyStart the survey!

Wsgi middleware that exposes an app's version number

Project description

Adds a /version url that returns a json response of the current application version.

Example usage:

from wsgiappversion import ApplicationVersion
from my_project import MyWSGIApp

application = MyWSGIApp()
application = ApplicationVersion(application, determine_version='my_project')

The required determine_version argument is used to determine what the current version actually is. determine_version can be either a string or a callable that takes no arguments. When a string is used then the version is determined by calling pkg_resources.require(package_name). If that would not work for your application then a callable that returns the correct version can be used.

Since a package version would likely not change without an application restart we would recommend using a closure (or some other similar method of caching a value) as your callable.

Project details


Release history Release notifications

This version

1.0.0

Download files

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

Files for wsgiappversion, version 1.0.0
Filename, size File type Python version Upload date Hashes
Filename, size wsgiappversion-1.0.0-py2.py3-none-any.whl (4.0 kB) File type Wheel Python version py2.py3 Upload date Hashes View hashes
Filename, size wsgiappversion-1.0.0.tar.gz (3.1 kB) File type Source Python version None Upload date Hashes View hashes

Supported by

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