Skip to main content

Add universal response for your API

Project description

Library for django rest framework

Repository: https://bitbucket.org/anmv/universal-response-mobile-api

PIP package: https://pypi.org/project/universal-response-mobile-api/

Install

pip install universal-response-mobile-api

Use

import universal_response_mobile_api as u_mobile_api

1. Decorator

Add your Django project, for default behavior:

file: settings.py

 import universal_response_mobile_api as u_mobile_api

'DEFAULT_RENDERER_CLASSES': (
        'u_mobile_api.StructuredJsonRenderer',
    ),

or use as decorator for rest-api.

2. Errors handler

Add your Django project:

file: settings.py

import universal_response_mobile_api as u_mobile_api

REST_FRAMEWORK = {
    ...
    'EXCEPTION_HANDLER': 'u_mobile_api.custom_exception_handler',
    ...
}

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

universal_response_mobile_api-0.1.9.tar.gz (3.2 kB view details)

Uploaded Source

Built Distribution

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

universal_response_mobile_api-0.1.9-py3-none-any.whl (5.0 kB view details)

Uploaded Python 3

File details

Details for the file universal_response_mobile_api-0.1.9.tar.gz.

File metadata

  • Download URL: universal_response_mobile_api-0.1.9.tar.gz
  • Upload date:
  • Size: 3.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.20.1 setuptools/40.6.2 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.6.7

File hashes

Hashes for universal_response_mobile_api-0.1.9.tar.gz
Algorithm Hash digest
SHA256 e19013f5035a1408f2c55fbf757b0f88087e03d4281ab8f35f713446de86887a
MD5 b2ddce4652b74b744330667be840db15
BLAKE2b-256 0bc8519e672893017ab7a1e0079395724ca0f0fc6af7c119e232ac0eb88dba71

See more details on using hashes here.

File details

Details for the file universal_response_mobile_api-0.1.9-py3-none-any.whl.

File metadata

  • Download URL: universal_response_mobile_api-0.1.9-py3-none-any.whl
  • Upload date:
  • Size: 5.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.20.1 setuptools/40.6.2 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.6.7

File hashes

Hashes for universal_response_mobile_api-0.1.9-py3-none-any.whl
Algorithm Hash digest
SHA256 c031a87fcc049d15343fbd802d711ef51264c96ce2519619f87a74d591da21d9
MD5 e457ee6e804fb5cdf172581da89a2b1f
BLAKE2b-256 ae91099ac4fb723765818a2404f43b1be82fc992f5015b0395831ca8e4531306

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