Coverage for docs_src/metadata/tutorial001_1.py: 100%

6 statements  

« prev     ^ index     » next       coverage.py v7.6.1, created at 2024-08-08 03:53 +0000

1from fastapi import FastAPI 1abcde

2 

3description = """ 1abcde

4ChimichangApp API helps you do awesome stuff. 🚀 

5 

6## Items 

7 

8You can **read items**. 

9 

10## Users 

11 

12You will be able to: 

13 

14* **Create users** (_not implemented_). 

15* **Read users** (_not implemented_). 

16""" 

17 

18app = FastAPI( 1abcde

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": "dp@x-force.example.com", 

28 }, 

29 license_info={ 

30 "name": "Apache 2.0", 

31 "identifier": "MIT", 

32 }, 

33) 

34 

35 

36@app.get("/items/") 1abcde

37async def read_items(): 1abcde

38 return [{"name": "Katana"}] 1abcde