March 4, 2024, 11:18 p.m. | Thiago da Silva Adriano

DEV Community dev.to

In this article, we'll create a simple RESTful API using Python 3 and FastAPI.


But whats is FastAPI?


FastAPI is a modern, fast (high-performance), web framework for building APIs with Python 3.6+ based on standard Python type hints.


First, lets go to import necessary modules and classes:



pip3 install fastapi uvicorn


Now the imports:



from fastapi import FastAPI, HTTPException
from pydantic import BaseModel
from typing import Optional
from uuid import UUID, uuid4



  • FastAPI from the fastapi package to create our …

api apis article building fastapi framework go to import install modern modules performance python python 3 restful api simple standard type web

Software Engineer for AI Training Data (School Specific)

@ G2i Inc | Remote

Software Engineer for AI Training Data (Python)

@ G2i Inc | Remote

Software Engineer for AI Training Data (Tier 2)

@ G2i Inc | Remote

Data Engineer

@ Lemon.io | Remote: Europe, LATAM, Canada, UK, Asia, Oceania

Artificial Intelligence – Bioinformatic Expert

@ University of Texas Medical Branch | Galveston, TX

Lead Developer (AI)

@ Cere Network | San Francisco, US