Skip to content

yeesolve/async_drf

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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)

About

Async views and viewsets for DRF

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages