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
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.8.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 87eef5604216fa40033416d51de818d37b4726e3995a27a4ff8f5da531fdf431 |
|
MD5 | faabce05e647ca829915f8bb92e674d4 |
|
BLAKE2b-256 | aff6a1593682957a46942691c8ff9a7e2606aae2e3208966c6fa7f1a7950e147 |
Close
Hashes for universal_response_mobile_api-0.1.8-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | cbc541e1d07053041c19d2ac3d00a2f3198deb89c52c828b11913fec0115b44c |
|
MD5 | b84cdb80192b3b791bfbb68138e3e614 |
|
BLAKE2b-256 | 9e7c38157b8f5bccaab39c02705b8cefe2551bf30c7f931f620a1e770c34eb47 |