django-drf-autoview
Expose CRUD DRF compatible api's for any django model with one line. This patten can be used to quickly bootstrap an api server app based on django DRF.
Example
# Add below snippet in api.py of the django app
from drf_autoview.api import get_api_views_with_all_fields_readonly
api_views = get_api_views_with_all_fields_readonly([
models.DemoModel,
])
# Add below snippet in site/api.py
from drf_autoview.api import register_with_router
def get_router():
_router = routers.DefaultRouter()
_apps = filter(lambda x: '<appName>' in x[1].name, apps.app_configs.items())
for _app_name, _app_obj in _apps:
if module_has_submodule(_app_obj.module, 'api'):
api = import_module('{0}.api'.format(_app_obj.module.__name__))
register_with_router(_router, api.api_views)
return _router
router = get_router()
Metadata
Release files for drf-autoview 1.0.0
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-autoview-1.0.0.tar.gz | 2.3 kB | Without provenance | Details for drf-autoview-1.0.0.tar.gz |
Release files / drf-autoview-1.0.0.tar.gz
| Download URL | drf-autoview-1.0.0.tar.gz |
|---|---|
| Size | 2.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
7fe38a9fb5c15745a604c9671de850a9a595624749f5803fa37c77f27189779c
|
|
BLAKE2b-256 checksum How to use checksums |
f6c5583d9b725bf5d7eab66be7ccad0082ffb4bb778e7870dd54093185e7e7a1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.35.0 CPython/3.7.4
|
Security for drf-autoview 1.0.0
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.