Simple API endpoint for app versionning
Project description
Django API Version
Simple api endpoint to display version from config
Create a version.py
file containing the VERSION
variable besides your settings.py
VERSION='0.0.1'
#You can also use an environment variable with the following
import os
VERSION=os.getenv('MY_VERSION', 'unknown')
Then import the version in your settings.py
from <project>.version import VERSION
And finally add the views in your urls
path(
"version/",
version_views.VersionView.as_view(),
name="version",
)
Then the version will be return on the corresponding endpoint.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Close
Hashes for tms-django-api-version-1.0.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | f75b5b18e52f178c8bc527a62f4f0f5a89cc61ed34df382a2ec44bc4e8b719d0 |
|
MD5 | bff0a17a66297ca6617a82eb4b4ae519 |
|
BLAKE2b-256 | 346a406d6693bdab19cfccbbaac7a358408bbba7b53271417eed08e5ce901328 |
Close
Hashes for tms_django_api_version-1.0.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 37918baba92a8b335b0bf64e18e5123da2b3730f76b588df02471c7d07e22752 |
|
MD5 | 1cbbf92a8c7e627bbd7efd7aaf42f846 |
|
BLAKE2b-256 | aac0c17270747873933b00572dd662ca3ade9e3e9c8c7fb33f853658baa90664 |