Blog
In-depth articles on AI agents, LLM engineering, servers, Python and software development.
FastAPI supports dynamic routing and parameter validation with flexibility and robustness. Basic usage includes paths like `/users/{user_id}`, where parameters can be automatically type-identified (e.
This article introduces the process of quickly building a "Student Information Management" database API service using FastAPI and SQLite. First, dependencies such as FastAPI, Uvicorn, and SQLAlchemy a
This article introduces the interaction methods between a FastAPI backend and frontend JavaScript. The core principle is that the frontend calls the backend API through HTTP requests, and the backend
This article introduces the complete deployment process of FastAPI, from local development to cloud server deployment. First, install FastAPI and Uvicorn locally, write a simple interface (e.g., `main
Combining FastAPI with Pydantic is an efficient combination for data processing in modern web development, where Pydantic focuses on data validation and serialization, and FastAPI provides high perfor
This article introduces the use of FastAPI middleware for uniformly handling request/response logic (such as logging and authentication) to avoid repetitive code. First, FastAPI and Uvicorn need to be
This article introduces Pydantic, a core tool in FastAPI for handling complex request bodies. Request bodies are used to pass complex data (e.g., JSON) in POST/PUT requests and are more suitable for s
Python version compatibility is crucial in FastAPI development. Mismatched versions can lead to installation failures, errors, or missing functionality. FastAPI supports a minimum Python version of 3.
Dependency Injection (DI) core is to inject dependencies (such as database connections) into functions automatically by the system, rather than having the functions acquire them themselves, thereby en
Swagger UI is the default API documentation tool for FastAPI, enabling interface visualization and testing. Customization can enhance its professionalism. For basic modifications, set parameters like