Codetail
Dashboard
Problems
Paths
Sessions
AC
FastAPI Fundamentals
Hello World with FastAPI
Easy
Write Code
Prev
1/10
Next
@app.get + uvicorn
Description
Create a minimal FastAPI application with a single endpoint that returns a JSON greeting.
Requirements
01
Import FastAPI and create an app instance
02
Define a GET endpoint at `/`
03
Return `{"message": "Hello, World!"}`
04
Show the uvicorn run command
Show 2 hints
Python 3
1
2
3
4
5
6
7
8
9
from fastapi import FastAPI # Create your app # Define your endpoint # Run command: uvicorn main:app --reload
Ln 9, Col 1
Submit for Review