FastAPI

FastAPI: How to Upload and Validate Files

Updated: March 19, 2023 By: Goodman

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)

Updated: March 19, 2023 By: Goodman

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

Updated: January 19, 2023 By: Khue

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

Updated: December 21, 2022 By: Frienzied Flame

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

Updated: August 11, 2023 By: Goodman

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)

Updated: December 9, 2022 By: Frienzied Flame

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

Updated: March 19, 2023 By: Goodman

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

Updated: November 4, 2022 By: Goodman

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

Updated: November 3, 2022 By: Khue

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)

Updated: November 3, 2022 By: Goodman

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…

1 2 3 4