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.10.tar.gz (2.6 kB view details)

Uploaded Source

Built Distribution

django_uniapi-1.0.10-py2.py3-none-any.whl (3.7 kB view details)

Uploaded Python 2 Python 3

File details

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

File metadata

  • Download URL: django-uniapi-1.0.10.tar.gz
  • Upload date:
  • Size: 2.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/45.0.0 requests-toolbelt/0.9.1 tqdm/4.41.1 CPython/3.8.2

File hashes

Hashes for django-uniapi-1.0.10.tar.gz
Algorithm Hash digest
SHA256 8b20cf73527dd12cd82878161a2e8af5ea9bd9c96f77f19dc68cf22d676ce832
MD5 a8cbad105e008c70dd6a732142f57e6f
BLAKE2b-256 51a39e69665ab80296cfb41ebc745d45830a80634d3574438c5043c70b6463a8

See more details on using hashes here.

File details

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

File metadata

  • Download URL: django_uniapi-1.0.10-py2.py3-none-any.whl
  • Upload date:
  • Size: 3.7 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/45.0.0 requests-toolbelt/0.9.1 tqdm/4.41.1 CPython/3.8.2

File hashes

Hashes for django_uniapi-1.0.10-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 96748e962b2def1e04bed4e1c2844166b149d7235efb37c147dc5906ff4e5e0b
MD5 bb78945a2b16a2dcb827de7ff65d0175
BLAKE2b-256 e0d252ec3def6b85a93664b89ca125b806c6c37a2612f43e8e7b042e3c57ba99

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