Skip to main content

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)

Metadata

Release files for async-drf 0.0.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for async-drf 0.0.3
File Size Uploaded
async-drf-0.0.3.tar.gz 3.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for async-drf 0.0.3
File Interpreter ABI Platform
async_drf-0.0.3-py3-none-any.whl Python 3 none any Details

Total release size: 8.3 kB

Release files / async-drf-0.0.3.tar.gz

Download URL async-drf-0.0.3.tar.gz
Size 3.8 kB
Tags Source
SHA-256 checksum
How to use checksums
fc1a267b6898bdbdbcd5bfa6bb4b5fb05b773fff97f174fa2306f8f1096f67a6
BLAKE2b-256 checksum
How to use checksums
c43edcb1da19ecc3add54676762010423fc4aad60eddc7f689e05341d1150176
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.0 CPython/3.9.5

Release files / async_drf-0.0.3-py3-none-any.whl

Download URL async_drf-0.0.3-py3-none-any.whl
Size 4.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e6656a244042f8135d7d30d3ef9810d2c05edd30044d31d7d0e2717be95e9c95
BLAKE2b-256 checksum
How to use checksums
b5216c65e5841e8beea9da29a16b2ba54e0aa29e3aaa5210ef8d2aabf85503fc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.0 CPython/3.9.5

Release history Release notifications | RSS feed

This release

0.0.3 This release

2 release files

0.0.2

2 release files

0.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page