Add universal response for your API
Project description
Library for django rest framework
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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Close
Hashes for universal_response_mobile_api-0.1.4.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7efe0142f228fd49311727ea2ca7cb0f37c261a30d737e82d1243ea63e3212c2 |
|
MD5 | 0865f50e5f2c8e3b163cbbaf9dea1e03 |
|
BLAKE2b-256 | 572a05900081492d2d8b1e785f37362bd284dffb9fdff7eadb2f39b59022e2de |
Close
Hashes for universal_response_mobile_api-0.1.4-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4df4fde7964493d60829e7a581f91b2256af9126bb7069c081d9978c6098ba43 |
|
MD5 | 2904735433bfc61752a0949d703de323 |
|
BLAKE2b-256 | 4e4287576fc9e0bc84802fc15c14b7485819d08a8d9eee8f08fbd76dc4b54f9d |