<div> <p>Completely updated for Django 4.0 & Django REST Framework 3.13</p> <p>Django for APIs is a project-based guide to building modern web APIs with Django & Django REST Framework. It is suitable for beginners who have never built an API before as well as professional programmers looki
Django for APIs: Build web APIs with Python and Django 4.0
β Scribed by William S. Vincent
- Publisher
- leanpub.com
- Year
- 2022
- Tongue
- English
- Leaves
- 200
- Category
- Library
No coin nor oath required. For personal study only.
β¦ Synopsis
Completely updated for Django 4.0 & Django REST Framework 3.13
Django for APIs is a project-based guide to building modern web APIs with Django & Django REST Framework. It is suitable for beginners who have never built an API before as well as professional programmers looking for a fast-paced introduction to Django fundamentals and best practices.
Over the course of 200+ pages you'll learn how to set up a new project properly, how web APIs work under the hood, and advanced testing and deployment techniques. Three separate projects are built from scratch with progressively more advanced features including a Library API, Todo API, and Blog API. User authentication, permissions, documentation, viewsets, and routers are all covered thoroughly.
Django for APIs is a best-practices guide to building powerful Python-based web APIs with a minimal amount of code.
β¦ Table of Contents
Table of Contents
Introduction
Why APIs
Django REST Framework
Prerequisites
Why this book
Conclusion
Chapter 1: Initial Set Up
The Command Line
Shell Commands
Install Python 3 on Windows
Install Python 3 on Mac
Python Interactive Mode
Virtual Environments
Install Django and Django REST Framework
Text Editors
Install Git
Conclusion
Chapter 2: Web APIs
World Wide Web
URLs
Internet Protocol Suite
HTTP Verbs
Endpoints
HTTP
Status Codes
Statelessness
REST
Conclusion
Chapter 3: Library Website
Traditional Django
First app
Models
Admin
Views
URLs
Templates
Tests
Git
Conclusion
Chapter 4: Library API
Django REST Framework
URLs
Views
Serializers
Browsable API
Tests
Deployment
Static Files
Deployment Checklist
GitHub
Heroku
Conclusion
Chapter 5: Todo API
Single Page Apps (SPAs)
Initial Set Up
.gitignore
Models
Tests
Django REST Framework
URLs
Serializers
Views
Browsable API
API Tests
CORS
CSRF
Back-End API Deployment
Conclusion
Chapter 6: Blog API
Initial Set Up
.gitignore
Custom User Model
Posts App
Post Model
Tests
Django REST Framework
URLs
Serializers
Views
Browsable API
CORS
Conclusion
Chapter 7: Permissions
Project-Level Permissions
Create New Users
Add Log In and Log Out
View-Level Permissions
Custom Permissions
Conclusion
Chapter 8: User Authentication
Basic Authentication
Session Authentication
Token Authentication
Default Authentication
Implementing token authentication
Endpoints
dj-rest-auth
User Registration
Tokens
Conclusion
Chapter 9: Viewsets and Routers
User endpoints
Viewsets
Routers
Permissions
Conclusion
Chapter 10: Schemas and Documentation
Schema
Dynamic Schema
Documentation
Conclusion
Chapter 11: Production Deployment
Environment Variables
DEBUG & SECRET_KEY
ALLOWED HOSTS
DATABASES
Static Files
Pyscopg and Gunicorn
requirements.txt
Procfile and runtime.txt
Deployment Checklist
Heroku Deployment
Conclusion
Advanced Topics
Next Steps
Giving Thanks
π SIMILAR VOLUMES
<span>In this book, we take you on a fun, hands-on and pragmatic journey to learning Django API React stack development. You'll start building your first Django API React stack app within minutes. Every chapter is written in a bite-sized manner and straight to the point as we donβt want to waste you
<p><b>Design, build and test RESTful web services with the Django framework and Python</b></p><h4>Key Features</h4><ul><li>Create efficient real-world RESTful web services with the latest Django framework</li><li>Authenticate, secure, and integrate third-party packages efficiently in your Web Servic