Skip to main content

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


Download files

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

Source Distribution

tms_django_api_version-1.0.1.tar.gz (2.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

tms_django_api_version-1.0.1-py3-none-any.whl (2.6 kB view details)

Uploaded Python 3

File details

Details for the file tms_django_api_version-1.0.1.tar.gz.

File metadata

  • Download URL: tms_django_api_version-1.0.1.tar.gz
  • Upload date:
  • Size: 2.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.28 {"installer":{"name":"uv","version":"0.9.28","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for tms_django_api_version-1.0.1.tar.gz
Algorithm Hash digest
SHA256 c660b456dff206c59710ff68e6b67d84e00f826a9c79d1a8f4865c547a70af4c
MD5 2c85a0dc452c3043e29ca2f7987bb402
BLAKE2b-256 2d73f9e86a8697b3d854ed601b038f4a0537e531fe8bd316d640e92cd456c7f0

See more details on using hashes here.

File details

Details for the file tms_django_api_version-1.0.1-py3-none-any.whl.

File metadata

  • Download URL: tms_django_api_version-1.0.1-py3-none-any.whl
  • Upload date:
  • Size: 2.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.28 {"installer":{"name":"uv","version":"0.9.28","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for tms_django_api_version-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 51f193f77e5e96494b0071266963c757a40c74afd3b02458dd607dc72a35fb43
MD5 cbb1d775beb3b1f3339b288ccaf3a0d3
BLAKE2b-256 789f7aba50f7469546897bb08e42c5b653fc8e3f9f6ecf3c7c306f0db6a9c076

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page