refactor: rename project to gallery

This commit is contained in:
2024-08-11 20:46:04 +03:00
parent 3785b8ce5d
commit 72fd378c40
48 changed files with 117 additions and 92 deletions

View File

@@ -0,0 +1,61 @@
import datetime
from enum import Enum
from pydantic import BaseModel
class Model(BaseModel):
class Config:
use_enum_values = True
class Cloudness(str, Enum):
CLEAR = "clear"
PARTLY_CLOUDY = "party_cloudy"
CLOUDY = "cloudy"
MAINLY_CLOUDY = "mainly_cloudy"
class Precipitation(str, Enum):
NO = "no"
SMALL_RAIN = "small_rain"
RAIN = "rain"
SHOWER = "shower"
class Sky(Model):
cloudness: Cloudness
precipitation: Precipitation
thunder: bool
fog: bool
class WindDirection(str, Enum):
CALM = "calm"
N = "N"
NO = "NO"
O = "O"
SO = "SO"
S = "S"
SW = "SW"
W = "W"
NW = "NW"
class WeatherValue(Model):
date: datetime.datetime
sky: Sky
temperature: list[int]
wind_speed: int
wind_gust: int
wind_direction: WindDirection
precipitation: float
pressure: list[int]
humidity: int
class WeatherResponse(Model):
location: str
date: datetime.date
period: str
values: list[WeatherValue]