From 790b76fa00d1cdc9ad17d8c0986d8ac82e623a77 Mon Sep 17 00:00:00 2001 From: Aki Date: Fri, 23 Sep 2022 23:49:06 +0200 Subject: Extended Enums for Levels and Models --- windy.py | 32 +++++++++++++++++++++++++++++--- 1 file changed, 29 insertions(+), 3 deletions(-) (limited to 'windy.py') diff --git a/windy.py b/windy.py index 3938ed6..d7567ff 100644 --- a/windy.py +++ b/windy.py @@ -5,13 +5,39 @@ import requests API = "https://api.windy.com/api" -class Model(Enum): - ICONEU = "iconEu" - +class _StrEnum(Enum): def __str__(self): return self.value +class Model(_StrEnum): + AROME = "arome" + GEOS5 = "geos5" + GFS = "gfs" + GFSWAVE = "gfsWave" + ICONEU = "iconEu" + NAMALASKA = "namAlaska" + NAMCONUS = "namConus" + NAMHAWAII = "namHawaii" + + +class Level(_StrEnum): + SURFACE = "surface" + H1000 = "1000h" + H950 = "950h" + H925 = "925h" + H900 = "900h" + H850 = "850h" + H800 = "800h" + H700 = "700h" + H600 = "600h" + H500 = "500h" + H400 = "400h" + H300 = "300h" + H200 = "200h" + H150 = "150h" + + class PointForecast: ENDPOINT = "/point-forecast/v2" -- cgit v1.1