Debian Codegraph @

docs_src/metadata/tutorial001_1_py310.py

raw
1 from fastapi import FastAPI
2
3 description = """
4 ChimichangApp API helps you do awesome stuff. 🚀
5
6 ## Items
7
8 You can **read items**.
9
10 ## Users
11
12 You will be able to:
13
14 * **Create users** (_not implemented_).
15 * **Read users** (_not implemented_).
16 """
17
18 app = FastAPI(
19 title="ChimichangApp",
20 description=description,
21 summary="Deadpool's favorite app. Nuff said.",
22 version="0.0.1",
23 terms_of_service="http://example.com/terms/",
24 contact={
25 "name": "Deadpoolio the Amazing",
26 "url": "http://x-force.example.com/contact/",
27 "email": "[email protected]",
28 },
29 license_info={
30 "name": "Apache 2.0",
31 "identifier": "Apache-2.0",
32 },
33 )
34
35
36 @app.get("/items/")
37 async def read_items():
38 return [{"name": "Katana"}]