forked from sfbrigade/data-covid19-sfbayarea
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathapp.py
23 lines (20 loc) · 756 Bytes
/
app.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
from flask import Flask
from scraper import pipeline
from typing import Dict
app = Flask(__name__)
@app.route('/scrape')
def scrape() -> Dict[str, Dict]:
bay_area_counties = [
'Solano County, California, United States',
'Alameda County, California, United States',
'Santa Clara County, California, United States',
'San Francisco County, California, United States',
'Contra Costa County, California, United States',
'San Mateo County, California, United States',
'Sonoma County, California, United States',
'Napa County, California, United States',
'Marin County, California, United States'
]
return pipeline(bay_area_counties);
if __name__ == '__main__':
app.run()