Django API Data Cache
API Data Cache is a simple mixin for Django REST framework to serve database objects to clients using the api_data_cache service.
It is composed of a mixing for list views that processes the request parameters from api_data_cache clients for pagination and filtering.
Installation
Install the package using pip:
pip install django_api_data_cacheAdd ‘api_data_cache’ to your Django project’s INSTALLED_APPS list in the settings.py file:
INSTALLED_APPS = [ # ... 'rest_framework', 'api_data_cache', # ... ]
Usage
Import the APIDataCacheListViewMixin into your view module:
from api_data_cache.mixins import APIDataCacheListViewMixinInherit the APIDataCacheListViewMixin in your view class:
from api_data_cache.mixins import APIDataCacheListViewMixin from rest_framework import viewsets from .models import YourModel from .serializer import YourPartialSerializer class YourListView(APIDataCacheListViewMixin, viewsets.GenericViewSet): queryset = YourModel.objects.all() serializer_class = YourPartialSerializer search_fields = ['field1', 'field2']
Metadata
Release files for django-api-data-cache 0.2.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 |
|---|---|---|---|---|
| django_api_data_cache-0.2.1.tar.gz | 5.6 kB | Without provenance | Details for django_api_data_cache-0.2.1.tar.gz |
Release files / django_api_data_cache-0.2.1.tar.gz
| Download URL | django_api_data_cache-0.2.1.tar.gz |
|---|---|
| Size | 5.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
3f76b60b0158d44d8660decb2be80c5a18fa7df6f74b78772877c9398b029693
|
|
BLAKE2b-256 checksum How to use checksums |
9e683b2bda84550d068fdfb33fdf219962812d76a212096193526b91f0a2cd67
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.8.12
|
Security for django-api-data-cache 0.2.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.