更新时间:2021-06-11 12:56:47
封面
版权页
Preface
About
About the Book
1. Your First Step
Learning Objectives
Introduction
Understanding API
RESTful API
HTTP Protocol
HTTP Methods and CRUD
The JSON Format
HTTP Status Codes
Open API
The Flask Web Framework
Building a Simple Recipe Management Application
Using curl or httpie to Test All the Endpoints
Postman
Summary
2. Starting to Build Our Project
What is Flask-RESTful?
Virtual Environment
Creating a Recipe Model
Configuring Endpoints
Making HTTP Requests to the Flask API using curl and httpie
3. Manipulating a Database with SQLAlchemy
Databases
SQL
ORM
Defining Our Models
Password Hashing
4. Authentication Services and Security with JWT
JWT
Flask-JWT-Extended
Designing the Methods in the Recipe Model
Refresh Tokens
The User Logout Mechanism
5. Object Serialization with marshmallow
Serialization versus Deserialization
marshmallow
A Simple Schema
UserSchema Design
RecipeSchema Design
The PATCH Method
6. Email Confirmation
Mailgun
User Account Activation Workflow
HTML Format Email
7. Working with Images
Building the User Avatar Function
Flask-Uploads
Image Resizing and Compression
Introduction to Pillow
8. Pagination Searching and Ordering
Pagination
Paginated APIs
Recipe Searching
Sorting and Ordering
9. Building More Features
Caching
Flask-Caching
API Rate Limiting
Flask-Limiter
10. Deployment
Deployment
Comparing SaaS PaaS and IaaS
The Heroku Platform
Configuration Handling in Smilecook
Heroku Application
Heroku Add-Ons
Setting Up Environment Variables for the Heroku App
Setting Up Variables in Postman
Setting up the Front-end Interface to Work with the Smilecook API