Shell to Py - Python for Sys Admins / Fastapi

Flask or FastAPI? Both! For fast prototypes Flask is still a damn good tool, but for “modern” APIs FastAPI might be better.

Create a minimal health check API using FastAPI:

pip install "fastapi[standard]"
from fastapi import FastAPI

app = FastAPI(
        title="TEST",
        description="TEST Project",
        version="0.1",
        )

@app.get("/health")
def health_check():
    return {"status": "ok"}

run FastAPI via:

fastapi dev FILENAME