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 details)
Built Distribution
File details
Details for the file async-drf-0.0.3.tar.gz
.
File metadata
- Download URL: async-drf-0.0.3.tar.gz
- Upload date:
- Size: 3.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.0 CPython/3.9.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | fc1a267b6898bdbdbcd5bfa6bb4b5fb05b773fff97f174fa2306f8f1096f67a6 |
|
MD5 | 3a91996568c724eb095fda9a3e2ead0a |
|
BLAKE2b-256 | c43edcb1da19ecc3add54676762010423fc4aad60eddc7f689e05341d1150176 |
File details
Details for the file async_drf-0.0.3-py3-none-any.whl
.
File metadata
- Download URL: async_drf-0.0.3-py3-none-any.whl
- Upload date:
- Size: 4.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.0 CPython/3.9.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e6656a244042f8135d7d30d3ef9810d2c05edd30044d31d7d0e2717be95e9c95 |
|
MD5 | 6b28112357031c81cfeef494a8184031 |
|
BLAKE2b-256 | b5216c65e5841e8beea9da29a16b2ba54e0aa29e3aaa5210ef8d2aabf85503fc |