Debian Codegraph @

docs/examples/hello_world.py

raw
1 from typing import Dict
2
3 from litestar import Litestar, get
4
5
6 @get("/")
7 async def hello_world() -> Dict[str, str]:
8 """Handler function that returns a greeting dictionary."""
9 return {"hello": "world"}
10
11
12 app = Litestar(route_handlers=[hello_world])
13
14 # run: /