Async views and viewsets for DRF
Project description
Django REST framework async views
How to use
from async_drf.mixins import AsyncMixin, AsyncListModelMixin
from async_drf.viewsets import AsyncGenericViewSet
class ProductsViewSet(AsyncMixin, AsyncGenericViewSet, AsyncListModelMixin):
serializer_class = ProductsSerializer
queryset = ProductModel.objects.prefetch_related().all()
async def list(self, request: Request, *args, **kwargs):
# do async stuff here
return Response(data=data)
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
async-drf-0.0.3.tar.gz
(3.8 kB
view hashes)
Built Distribution
Close
Hashes for async_drf-0.0.3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e6656a244042f8135d7d30d3ef9810d2c05edd30044d31d7d0e2717be95e9c95 |
|
MD5 | 6b28112357031c81cfeef494a8184031 |
|
BLAKE2b-256 | b5216c65e5841e8beea9da29a16b2ba54e0aa29e3aaa5210ef8d2aabf85503fc |