ims_envista.const   A
last analyzed

Complexity

Total Complexity 0

Size/Duplication

Total Lines 78
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 69
dl 0
loc 78
rs 10
c 0
b 0
f 0
wmc 0
1
"""Constant for ims-envista."""
2
3
from .ims_variable import IMSVariable
4
5
ENVISTA_STATIONS_URL = "https://api.ims.gov.il/v1/envista/stations"
6
ENVISTA_REGIONS_URL = "https://api.ims.gov.il/v1/envista/regions"
7
8
GET_ALL_STATIONS_DATA_URL = ENVISTA_STATIONS_URL
9
GET_ALL_REGIONS_DATA_URL = ENVISTA_REGIONS_URL
10
GET_SPECIFIC_STATION_DATA_URL = ENVISTA_STATIONS_URL + "/{}"
11
GET_SPECIFIC_REGION_DATA_URL = ENVISTA_REGIONS_URL + "/{}"
12
GET_LATEST_STATION_DATA_URL = ENVISTA_STATIONS_URL + "/{}/data{}/latest"
13
GET_EARLIEST_STATION_DATA_URL = ENVISTA_STATIONS_URL + "/{}/data{}/earliest"
14
GET_DAILY_STATION_DATA_URL = ENVISTA_STATIONS_URL + "/{}/data{}/daily"
15
GET_STATION_DATA_BY_DATE_URL = GET_DAILY_STATION_DATA_URL + "/{}/{}/{}"
16
17
GET_MONTHLY_STATION_DATA_URL = ENVISTA_STATIONS_URL + "/{}/data{}/monthly"
18
GET_MONTHLY_STATION_DATA_BY_MONTH_URL = GET_MONTHLY_STATION_DATA_URL + "/{}/{}"
19
GET_STATION_DATA_BY_RANGE_URL = (
20
    ENVISTA_STATIONS_URL + "/{}/data{}?from={}/{}/{}&to={}/{}/{}"
21
)
22
23
API_BP = "BP"
24
API_DIFF = "Diff"
25
API_GRAD = "Grad"
26
API_NIP = "NIP"
27
API_RAIN = "Rain"
28
API_RAIN_1_MIN = "Rain_1_min"
29
API_WS_MAX = "WSmax"
30
API_WD_MAX = "WDmax"
31
API_WS = "WS"
32
API_WD = "WD"
33
API_STD_WD = "STDwd"
34
API_TD = "TD"
35
API_TW = "TW"
36
API_RH = "RH"
37
API_TD_MAX = "TDmax"
38
API_TD_MIN = "TDmin"
39
API_TG = "TG"
40
API_WS_1MM = "WS1mm"
41
API_WS_10MM = "Ws10mm"
42
API_TIME = "Time"
43
API_REGION_ID = "regionId"
44
API_NAME = "name"
45
API_STATIONS = "stations"
46
API_DATETIME = "datetime"
47
API_CHANNELS = "channels"
48
API_VALID = "valid"
49
API_STATUS = "status"
50
API_VALUE = "value"
51
API_STATION_ID = "stationId"
52
API_DATA = "data"
53
54
VARIABLES = {
55
    API_BP: IMSVariable("BP", "hPa", "Average pressure at station level"),
56
    API_DIFF: IMSVariable("Diff", "w/m²", "Diffused radiation"),
57
    API_GRAD: IMSVariable("Grad", "w/m²", "Global radiation"),
58
    API_NIP: IMSVariable("NIP", "w/m²", "Direct radiation"),
59
    API_RAIN: IMSVariable("Rain", "mm", "Rainfall"),
60
    API_RH: IMSVariable("RH", "%", "Relative humidity"),
61
    API_STD_WD: IMSVariable("STDwd", "deg", "Standard deviation wind direction"),
62
    API_TD: IMSVariable("TD", "°C", "Temperature"),
63
    API_TD_MAX: IMSVariable(
64
        "TDMax",
65
        "°C",
66
        "Maximum temperature",
67
    ),
68
    API_TD_MIN: IMSVariable("TDmin", "°C", "Minimum temperature"),
69
    API_TG: IMSVariable("TG", "°C", "Grass minimum temperature"),
70
    API_WD: IMSVariable("WD", "deg", "Wind direction"),
71
    API_WD_MAX: IMSVariable("WDmax", "deg", "Gust wind direction"),
72
    API_WS: IMSVariable("WS", "m/s", "Wind speed"),
73
    API_WS_10MM: IMSVariable("Ws10mm", "m/s", "Maximum 10 minutes wind speed"),
74
    API_TIME: IMSVariable("Time", "hhmm", "end time of Ws10mm"),
75
    API_WS_1MM: IMSVariable("WS1mm", "m/s", "Maximum 1 minute wind speed"),
76
    API_WS_MAX: IMSVariable("WSmax", "m/s", "Gust wind speed"),
77
    API_RAIN_1_MIN: IMSVariable("Rain_1_min", "mm", "Rainfall per minute"),
78
}
79