FastAPI: How to Upload and Validate Files
This concise, straightforward article shows you how to upload and validate files in a FastAPI application. Uploading Files The Steps To receive and handle files as well as…
FastAPI: Allowing Requests from Other Origins (CORS)
Introduction By default, a FastAPI application does not allow requests from different origins than its own domain. Allowing requests from different origins in FastAPI is a common scenario…
Serving Static Files in FastAPI: Tutorial & Example
This tutorial shows you how to serve static files (images, CSS files, Javascript files, HTML files, or something like that) in FastAPI. Before getting started, you can see…
How to Create an XML Sitemap in FastAPI
This article walks you through a step-by-step guide to generating an XML Sitemap with FastAPI. Without any further ado, let’s get started. What is an XML Sitemap? An…
Deploying FastAPI on Ubuntu with Nginx and Let’s Encrypt
FastAPI is a modern, fast, and high-performance web framework for building APIs and web applications. After coding and developing a FastAPI application on your personal computer, you will…
FastAPI: How to Disable the Docs (Swagger UI and ReDoc)
FastAPI is an open-source, lightweight, high-performance, and secure web framework for building backend APIs. Despite its young age, FastAPI has been well received by the community and in…
Getting the Request Body in FastAPI
In POST requests, values are sent in the body of the request. When the client side wants to upload files or images, they are most likely sent with…
How to Extract Query Parameters in FastAPI
A query string is the part of a URL that comes after the question mark ?. It is meant to send small amounts of information to the server…
How to Use Dynamic Routes in FastAPI
Routing refers to how an API’s endpoints (URIs) respond to incoming requests. In FastAPI, a route path, in combination with a request method, define the endpoint at which…
Write Your First Backend API with FastAPI (Hello World)
This step-by-step guide shows you how to write your first Restful API with FastAPI: the Hello World project. Without any further ado, let’s get started. Set Up Environment…
« Previous 1 2 3 4