You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: app/main.py
+10-9Lines changed: 10 additions & 9 deletions
Original file line number
Diff line number
Diff line change
@@ -1,17 +1,18 @@
1
1
"""
2
2
app.main.py
3
3
"""
4
-
importdatetimeasdt
5
-
importenum
6
4
importlogging
7
5
importos
8
6
importreprlib
7
+
importdatetimeasdt
9
8
10
-
importfastapi
11
9
importpydantic
12
10
importuvicorn
13
11
14
-
fromtypingimportDict, List
12
+
fromfastapiimportFastAPI
13
+
fromfastapiimportRequest, Response
14
+
15
+
fromfastapi.responsesimportJSONResponse
15
16
16
17
fromfastapi.middleware.wsgiimportWSGIMiddleware
17
18
fromfastapi.middleware.corsimportCORSMiddleware
@@ -27,7 +28,7 @@
27
28
# ############
28
29
LOGGER=logging.getLogger('api')
29
30
30
-
APP=fastapi.FastAPI(
31
+
APP=FastAPI(
31
32
title='Coronavirus Tracker',
32
33
description='API for tracking the global coronavirus (COVID-19, SARS-CoV-2) outbreak. Project page: https://github.com/ExpDev07/coronavirus-tracker-api.',
33
34
version='2.0.1',
@@ -50,7 +51,7 @@
50
51
51
52
# TODO this could probably just be a FastAPI dependency.
0 commit comments