#_
HashConsole
Features
Templates
Courses
Pricing
Contact
Log in
Get started
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
Mark lesson complete
main.py
1
from fastapi import FastAPI
2
3
app = FastAPI()
4
5
@app.get("/health")
6
def health():
7
return {"status": "ok"}
YOUR NOTES
Saved in this browser only.