forked from PatrykBlacha/PythonLawiny
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.py
More file actions
23 lines (18 loc) · 652 Bytes
/
main.py
File metadata and controls
23 lines (18 loc) · 652 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
import os
from avalanche_danger import get_avalanche_risk_topr
from routes import get_routes_to_json
from flask_routes.map_routes import *
from flask_routes.weather_routes import *
from flask_routes.web_and_accounts_routes import *
from weather import weather_icon
PNG_PATH = 'static/risk_map.png'
if not os.path.exists("static/hiking_trails.geojson"):
get_routes_to_json()
os.makedirs("static/plots", exist_ok=True)
if __name__ == "__main__":
with app.app_context():
db.create_all()
print("Baza danych została zainicjalizowana.")
print(weather_icon(1))
print(get_avalanche_risk_topr())
app.run(host="0.0.0.0")