all AI news
Create a RESTful API with Python 3 and FastAPI
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
More from dev.to / DEV Community
Jobs in AI, ML, Big Data
Data Architect
@ University of Texas at Austin | Austin, TX
Data ETL Engineer
@ University of Texas at Austin | Austin, TX
Lead GNSS Data Scientist
@ Lurra Systems | Melbourne
Senior Machine Learning Engineer (MLOps)
@ Promaton | Remote, Europe
Senior Principal, Product Strategy Operations, Cloud Data Analytics
@ Google | Sunnyvale, CA, USA; Austin, TX, USA
Data Scientist - HR BU
@ ServiceNow | Hyderabad, India