Package: fast-drf
Fast DRFFast DRF is a small library for making API faster with Django and Django REST Framework.
It's easy and configurable.Full DocumentationhereChange Log ishereFeaturesRuntime API creation without writing View, Serializer, Url, etcAPI versioning by default.Control fields on each versionsAn enhanced filtering support align with Django query filter.Customizable API URL and API Prefix.Options for Overriding Viewset, Serializer, QuerysetQuery optimization enabled for API with Django'sprefetch_relatedandselect_relatedFull control over project during making automated API. i.e: you can select an Django app to enable for making API.Quick StartInstall the library inside your  virtualenv by using pippip install fast-drfAdd 'rest_framework' toINSTALLED_APPSAdd fast_drf.router.BasicRouter.get_urls() to theurlpatternsinurls.py, e.g.fromdjango.contribimportadminfromdjango.urlsimportpathfromfast_drf.routerimportBasicRouterurlpatterns=[path('admin/',admin.site.urls),]+BasicRouter.get_urls()Add config for Fast DRF like following,FAST_DRF_CONFIG={'DEFAULT_APPLIED_APPS':('example_app','another_app')}Update your every model or if you use base abstract model then it's good and less time you need. Update model like following,Overriding theexpose_apiclassmethod is not necessary anymore. If you just inherit theExposeApiModelMixinmixin class then your app will be detect a api url accordingly.fromfast_drf.mixins.expose_api_model_mixinimportExposeApiModelMixinfromdjango.dbimportmodelsclassMyModel(ExposeApiModelMixin,models.Model):#... All yor fieldspass# The following methods are available from model mixin@classmethoddefexposed_api(cls,*args,**kwargs):"""This method holds a bunch of API configs and return like following...{"api_url": "",  # (NOT REQUIRED)# You must use from HTTPVerbsEnum. Like HTTPVerbsEnum.GET.value, HTTPVerbsEnum.POST.value"allowed_methods": ['get', 'post', 'put', 'patch', 'delete'], # (NOT REQUIRED)# slug_field is application 'put', 'patch', 'delete' these methods"slug_field": "pk", # (NOT REQUIRED) DEFAULT [PK] (Must be model field, unique or primary key)"queryset": "",  # (NOT REQUIRED) default all"viewset_class": "",  # (NOT REQUIRED) BaseViewset class"serializer_class": "",  # (NOT REQUIRED) default BaseEntitySerializer"permission_classes": "",  # (NOT REQUIRED) default set from settings}:param args::param kwargs::return: An empty Dictionary/False OR Full config dictionary."""api_configs={"api_url":'my-model-api',}returnapi_configsEnable multiple API versionTo achieve this awesomeness rewrite the following method in your model@classmethoddefapi_version_fields(cls,**kwargs):"""*** DEFAULT VERSION `v1` ***This method will return a dictionary object with version number and fields name. Fields are similar likeserializer fields. Or you can say exactly as same as serializer fields.:param kwargs: Currently nothing to receive on kwargs:return: a dictionary object with version number"""versions={'v1':['id','name','custom_1','custom_2'],'v2':['id','name','something_else']}returnversionsAppend a slash at the end of of APISetAPPEND_SLASH = Trueat your settings.pyAPI Prefix ChangeSet you API prefix as your own like following.FAST_DRF_CONFIG={# ...'DEFAULT_API_PREFIX':'rest-api'# Default 'api'# ...}Your API will look like,/rest-api/v1/users/That's it.You can also override serializer class and viewset class