Skip to main content

django-version-endpoint

> Provide an endpoint to query installed python package versions

https://travis-ci.org/propylon/django-version-endpoint.svg?branch=master

Usage

Installation

  1. Install the package:

    pip install django-version-endpoint
  2. Install the application by adding it to the INSTALLED_APPS setting:

    INSTALLED_APPS += ('version_endpoint',)
  3. Set the package names, you’re interested in:

    VERSION_ENDPOINT_PACKAGE_NAMES = (
        'all',
        'interesting',
        'packages'
    )
  4. Add the url to your urls.py:

    from django.conf.urls import include
    
    urlpatterns += url(r'^', include('version_endpoint.urls'))

Endpoints

versions/

You can call the “versions” endpoint to get the information about the installed package versions.

Request a content type of “application/json” and a dictionary is returned:

{
    'versions': {
        'all': '1.1',
        'interesting': '2.2',
        'packages': '3.3'
    },
    'host': 'hostname'
}

Otherwise a rendered html page is returned.

versions/<package_name>/

The versions endpoint can get a single package name as well to specifically return the mentioned package’s version.

Overwriting the template

In order to overwrite the html template for your needs, just create a template called “version_endpoint.html” in your project, that’s retrieved before the default one of the application. For example with the standard template loader and directory in the project’s folder under a “templates” folder. You can use the dictionary mentioned above as context for the template.

If you want to override the html response for the single package endpoint, you can do the same for the “version_endpoint_single.html” template.

Development

Makefile

This project uses a Makefile for various tasks. Some of the available tasks are listed below.

  • make clean - Clean build artifacts out of your project

  • make test - Run Tests

  • make plain-test - Run Tests without rebuilding the project

  • make sdist - Build a Python source distribution

  • make docs - Build the Sphinx documentation

  • make lint - Get a codestyle report about your code

  • make plain-lint - Get a codestyle report without rebuilding the project

  • make - Equivalent to make test lint docs sdist

Metadata

Release files for django-version-endpoint 1.0.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for django-version-endpoint 1.0.4
File Size Uploaded Provenance Actions
django-version-endpoint-1.0.4.tar.gz 197.4 kB Without provenance Details for django-version-endpoint-1.0.4.tar.gz

Release files / django-version-endpoint-1.0.4.tar.gz

Download URL django-version-endpoint-1.0.4.tar.gz
Size 197.4 kB
Tags Source
SHA-256 checksum
How to use checksums
0f32378236e0bc26d8b2d8684904ddff7a98793339c5bf63e9c195404be1d677
BLAKE2b-256 checksum
How to use checksums
ac08afe445680ba853eff8c05431af88d7f92c04c4dbd12bfbfe512ce276e079
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/3.6.7

Security for django-version-endpoint 1.0.4

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

1.0.4 This release

1 release file No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page