Preview. Cloud workspaces are coming soon. For now, follow the exercises in your own editor and terminal. Back to the course
REST APIs with FastAPI › Your first Python service › Create your first endpoint
preview · workspace not running
main.py
1from fastapi import FastAPI
2
3app = FastAPI()
4
5@app.get("/health")
6def health():
7 return {"status": "ok"}
Saved in this browser only.