Skip to content

Commit bdae7f0

Browse files
committed
divide sections
1 parent b1a4742 commit bdae7f0

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

app/main.py

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,11 @@
1010
import uvicorn
1111

1212

13+
# #################################
14+
# Models
15+
# #################################
16+
17+
1318
class Totals(pydantic.BaseModel):
1419
confirmed: int
1520
deaths: int
@@ -51,6 +56,16 @@ class Location(pydantic.BaseModel):
5156
location: Country
5257

5358

59+
# ################
60+
# Dependencies
61+
# ################
62+
63+
64+
# ############
65+
# FastAPI App
66+
# ############
67+
LOGGER = logging.getLogger("api")
68+
5469
APP = fastapi.FastAPI(
5570
title="Coronavirus Tracker",
5671
description="API for tracking the global coronavirus (COVID-19, SARS-CoV-2) outbreak.",
@@ -60,6 +75,15 @@ class Location(pydantic.BaseModel):
6075
redoc_url="/docs",
6176
)
6277

78+
# #####################
79+
# Middleware
80+
#######################
81+
82+
83+
# ################
84+
# Routes
85+
# ################
86+
6387

6488
@APP.get("/latest", response_model=Latest)
6589
def get_latest():

0 commit comments

Comments
 (0)