Skip to main content

Django General/Universal API

Project description

Django General/Universal API

Installation

pip install django-uniapi

Urls.py

urlpatterns = [
    url(r'^uniapi/', include('django_uniapi.urls', namespace='django_uniapi')),
]

or:

from django.conf.urls import include, url
from django_uniapi import views as uni_views

urlpatterns = [
    url(r'^status$', uni_views.server_status, name='server_status'),
    url(r'^time$', uni_views.server_time, name='server_time'),
    url(r'^error$', uni_views.raise_error, name='raise_error'),
]

urlpatterns += [
    url(r'^set_cookie$', uni_views.set_cookie, name='set_cookie'),
    url(r'^del_cookie$', uni_views.del_cookie, name='del_cookie'),
    url(r'^del_cookie2$', uni_views.del_cookie2, name='del_cookie2'),
]

Settings.py

INSTALLED_APPS = (
    ...
    'django_uniapi',
    ...
)

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

django-uniapi-1.0.7.tar.gz (2.5 kB view details)

Uploaded Source

Built Distribution

django_uniapi-1.0.7-py2.py3-none-any.whl (3.6 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file django-uniapi-1.0.7.tar.gz.

File metadata

  • Download URL: django-uniapi-1.0.7.tar.gz
  • Upload date:
  • Size: 2.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/18.5 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/2.7.10

File hashes

Hashes for django-uniapi-1.0.7.tar.gz
Algorithm Hash digest
SHA256 b31b2b7aace1f0540280b1591b3fb19437c6489b03308f5db8772fee5fef6be6
MD5 5ed48eecebd5b7e6d91abb78b1054b17
BLAKE2b-256 bcad1883a4b531125f387a1021ffb43b5722ae88e17ba80150fabd6b92f7b786

See more details on using hashes here.

File details

Details for the file django_uniapi-1.0.7-py2.py3-none-any.whl.

File metadata

  • Download URL: django_uniapi-1.0.7-py2.py3-none-any.whl
  • Upload date:
  • Size: 3.6 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/18.5 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/2.7.10

File hashes

Hashes for django_uniapi-1.0.7-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 0168491b586b1b4a88765830d088cc3afcf9e3325fdeddeddd8e959084c0ae47
MD5 6f06d39ab9f78cd2ab6594c09f258a28
BLAKE2b-256 d115bdc422b4467537fbb42054af4deb38c1a6f71365d1d8af940bd12b80a692

See more details on using hashes here.

Supported by

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