Django Api Boilerplate

screenshot of Django Api Boilerplate

Legos for your Django API

Overview

The django-api-boilerplate project is designed to provide the necessary foundations for creating well-behaved APIs in Django. Unlike other apps that automatically generate APIs, such as tastypie or piston, this project focuses on providing the building blocks that developers can use to quickly create their own RESTful APIs using Django's Class-based views. The project includes features such as class-based API views and decorators, API responses for different HTTP codes, model pagination, and various authentication middlewares. The code in this project is derived from Kippt's API and is designed for easy consumption, with simple authentication (browser session) and JSON output. This makes API debugging convenient with tools like Chrome's JSONView and Postman extensions.

Features

  • Class-based API views and decorators: Django's Class-based views are utilized to create API views, making it easy to define and handle different API endpoints.
  • API Responses for different HTTP codes: The project includes functionality to generate appropriate API responses for different HTTP status codes, ensuring a consistent and standardized API experience.
  • Model pagination: Pagination support is provided, allowing users to retrieve large data sets in smaller chunks.
  • Authentication middlewares: The project offers different authentication middlewares to handle authentication for API requests, including Django cookies, HTTP Basic, and API Key authentication.

Summary

The django-api-boilerplate project provides developers with the necessary foundations for creating well-behaved APIs in Django. It offers features such as class-based API views, API responses for different HTTP codes, model pagination, and authentication middlewares. By using this project, developers can quickly roll out their own RESTful APIs using Django's Class-based views. The project is designed for easy consumption with simple authentication and JSON output, making API debugging convenient with tools like Chrome's JSONView and Postman extensions.