Motivation:
When we design restful api, we tends to design clean api, one resource for one endpoints.
When we get data from api, we tends to reduce the number of requests, so we would like to
get all related resources with minimum api.
With drf-wrapper, you can design clean api, and call the wrapper api to get all required
data with just one requests.
How it works:
It is very simple, parse the required api url as query string like:
http://127.0.0.1/api/wrapper/?urls=/api/item_a/,/api/item_b/
The library will carry over all the cookie, header from the orignal request to each api view,
that means all permission checking etc works the same as before.
Installation:
* pip install drf_wrapper
* in your settings add 'drf_wrapper' into app
* in urls.py
urlpatterns += patterns(
'',
url(r'wrapper/', 'drf_wrapper.views.wrapper_view')
)
Roadmap:
* Add pass through param support. Enable api calls like: /api/wrapper?urls=/api/hot_item,/api/company/{0:company_id}/
* Add threshold. The maximum apis can be bundled in one wrapper.
Metadata
Release files for drf_wrapper 0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| drf_wrapper-0.1.tar.gz | 2.1 kB | Without provenance | Details for drf_wrapper-0.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| drf_wrapper-0.1.macosx-10.9-x86_64.exe | Details for drf_wrapper-0.1.macosx-10.9-x86_64.exe |
Total release size: 67.8 kB
Release files / drf_wrapper-0.1.tar.gz
| Download URL | drf_wrapper-0.1.tar.gz |
|---|---|
| Size | 2.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
35d101e8f2cf703625da2181b38d21164ad105dc79a42823b5a4926f1b7a2484
|
|
BLAKE2b-256 checksum How to use checksums |
4cbc8f685bfd618875252a4df4bbcc8eba8c905ebffb88763f739869aada690d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Release files / drf_wrapper-0.1.macosx-10.9-x86_64.exe
| Download URL | drf_wrapper-0.1.macosx-10.9-x86_64.exe |
|---|---|
| Size | 65.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
5ff2bca30a85573519c70019872ffc371e84425db26f30f7dd79a5217bff9213
|
|
BLAKE2b-256 checksum How to use checksums |
832d9e40b4db0bf66f42f1e5bedd6749705b4651bb1fc26b1fbbdc9069213cb1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for drf_wrapper 0.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.