[Django]-Why do you need to use Django REST API?

9👍

You do not NEED to use Django REST framework to make an API

But if you are going to make a decent REST API in Django, DRF is a framework on top of Django that helps you building an API with following features:

  • Web browseable API, documentation autogeneration
  • Generic views auto building from models
  • Routers
  • Body parsers (auto content-negotiation)
  • Validators
  • Authentication
  • Permissions
  • Throttling
  • Data auto filtering via get params
  • 4 different pagination modes (number/offset/time)
  • API Versioning
  • Multiple response formats (.xml/.json/etc)
  • Exception format to current response format

You are free to reinvent the wheel and/or create a buggy/insecure REST API or you can choose to use a well thought and tested framework to help you build a good REST API.

Leave a comment