Few hacks to speed up defining apis based on django rest framwork, inspired from fastapi
Few hacks to speed up defining APIs based on django rest framwork, inspired from fastapi
First version tested on: python 3.9 and django 4.0
Features:
- Function based view
- Easy to use decorator
- Accepts validation of input and output using DRF serializers
- Accept CamelCased input and group all rest input methods in same dict :
req
- Jsonify and camelcase any type of output:
str
,dict
,QuerySet
,Model
- AutoSchema docs using drf-spectacular
- Error handler that works with DRF
- Better way to pass the
request
object inside views - Convert DRF serializers into a type annotation classes for better processing by IDEs
Quick start
-
Install the lib::
$ pip install django-fast-api