feat(app/view): add tag routing

This commit is contained in:
2024-08-04 23:54:24 +03:00
parent 891869c58c
commit 217ba7e46c
4 changed files with 103 additions and 8 deletions

22
weather/util.py Normal file
View File

@@ -0,0 +1,22 @@
import datetime
from weather.model import Cloudness, Precipitation, Sky, WeatherValue, WindDirection
def build_weather_value(date: datetime.datetime) -> WeatherValue:
return WeatherValue(
date=date,
sky=Sky(
cloudness=Cloudness.CLEAR,
precipitation=Precipitation.NO,
thunder=False,
fog=False,
),
temperature=[],
wind_speed=0,
wind_gust=0,
wind_direction=WindDirection.CALM,
precipitation=0,
pressure=[],
humidity=0,
)