API Routing and HTTP Verbs for RESTful Endpoints
Following our first API with FastAPI in Creating Your First Web API with FastAPI, this article explores API Routing and HTTP Verbs for RESTful Endpoints. We'll learn how to structure our API with different routes and how to use the correct HTTP methods for each action.
Authentication and Authorization Basics for APIs: JWT (Introduction)
Following our lesson on CORS (Cross-Origin Resource Sharing) in FastAPI APIs, this article introduces Authentication and Authorization Basics for APIs: JWT (Introduction). Securing your API is crucial, and JSON Web Tokens (JWT) are a popular way to handle authentication.
CORS (Cross-Origin Resource Sharing) in FastAPI APIs
Following our lesson on Dependency Injection in FastAPI, this article explains CORS (Cross-Origin Resource Sharing) in FastAPI APIs. CORS is a security feature that browsers implement to control how web pages in one domain can request resources from another domain.
Creating Your First Web API with FastAPI
Following our introduction to Introduction to RESTful APIs: Principles and Design, this article will guide you through Creating Your First Web API with FastAPI. FastAPI is a modern, fast (high-performance) web framework for building APIs with Python 3.6+ based on standard Python type hints.
Dependency Injection in FastAPI
Following our lesson on Status Codes and Error Handling in Web APIs, this article explores Dependency Injection in FastAPI. This is one of FastAPI's most powerful features, allowing you to manage dependencies and reuse code in a simple and elegant way.
Introduction to RESTful APIs: Principles and Design
This article introduces Introduction to RESTful APIs: Principles and Design. Before we dive into FastAPI, it's crucial to understand the principles of REST, which is the architectural style that most web APIs follow.
Request and Response Bodies: Pydantic models
Following our lesson on API Routing and HTTP Verbs for RESTful Endpoints, this article focuses on Request and Response Bodies: Pydantic models. Pydantic is a library for data validation and settings management using Python type hints. FastAPI uses Pydantic models to define the structure of request and response bodies, providing automatic validation and serialization.
Status Codes and Error Handling in Web APIs
Following our lesson on Request and Response Bodies: Pydantic models, this article focuses on Status Codes and Error Handling in Web APIs. Returning appropriate HTTP status codes and handling errors gracefully is crucial for building a robust and predictable API.