Pengantar FastAPI
Matt Eckerle
Software and Data Engineering Leader
FastAPI adalah cara cepat membangun API berkinerja tinggi dengan Python



pip install fastapi
main.pyfrom fastapi import FastAPI
app = FastAPI()
@app.get("/")
def read_root():
return {"message": "Hello World"}
fastapi dev main.py

Tulis kode server di editor Python sebagai main.py
Jalankan dari terminal dengan perintah
fastapi dev main.py
Application startup complete.Control + C di terminal yang samaPengantar FastAPI