meteo-lt-pkg 0.2.4__py3-none-any.whl → 0.3.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- meteo_lt/models.py +0 -33
- {meteo_lt_pkg-0.2.4.dist-info → meteo_lt_pkg-0.3.0.dist-info}/METADATA +3 -2
- meteo_lt_pkg-0.3.0.dist-info/RECORD +9 -0
- {meteo_lt_pkg-0.2.4.dist-info → meteo_lt_pkg-0.3.0.dist-info}/WHEEL +1 -1
- meteo_lt_pkg-0.2.4.dist-info/RECORD +0 -9
- {meteo_lt_pkg-0.2.4.dist-info → meteo_lt_pkg-0.3.0.dist-info/licenses}/LICENSE +0 -0
- {meteo_lt_pkg-0.2.4.dist-info → meteo_lt_pkg-0.3.0.dist-info}/top_level.txt +0 -0
meteo_lt/models.py
CHANGED
|
@@ -51,10 +51,6 @@ class ForecastTimestamp:
|
|
|
51
51
|
pressure: float = field(metadata={"json_key": "seaLevelPressure"})
|
|
52
52
|
humidity: float = field(metadata={"json_key": "relativeHumidity"})
|
|
53
53
|
precipitation: float = field(metadata={"json_key": "totalPrecipitation"})
|
|
54
|
-
condition: str = field(init=False)
|
|
55
|
-
|
|
56
|
-
def __post_init__(self):
|
|
57
|
-
self.condition = map_condition(self.condition_code)
|
|
58
54
|
|
|
59
55
|
|
|
60
56
|
@dataclass
|
|
@@ -127,32 +123,3 @@ Coordinates.from_dict = classmethod(from_dict)
|
|
|
127
123
|
Place.from_dict = classmethod(from_dict)
|
|
128
124
|
ForecastTimestamp.from_dict = classmethod(from_dict)
|
|
129
125
|
Forecast.from_dict = classmethod(from_dict)
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
def map_condition(api_condition):
|
|
133
|
-
"""Condition code mapping"""
|
|
134
|
-
condition_mapping = {
|
|
135
|
-
"clear": "sunny",
|
|
136
|
-
"partly-cloudy": "partlycloudy",
|
|
137
|
-
"cloudy-with-sunny-intervals": "partlycloudy",
|
|
138
|
-
"cloudy": "cloudy",
|
|
139
|
-
"thunder": "lightning",
|
|
140
|
-
"isolated-thunderstorms": "lightning-rainy",
|
|
141
|
-
"thunderstorms": "lightning-rainy",
|
|
142
|
-
"heavy-rain-with-thunderstorms": "lightning-rainy",
|
|
143
|
-
"light-rain": "rainy",
|
|
144
|
-
"rain": "rainy",
|
|
145
|
-
"heavy-rain": "pouring",
|
|
146
|
-
"light-sleet": "snowy-rainy",
|
|
147
|
-
"sleet": "snowy-rainy",
|
|
148
|
-
"freezing-rain": "snowy-rainy",
|
|
149
|
-
"hail": "hail",
|
|
150
|
-
"light-snow": "snowy",
|
|
151
|
-
"snow": "snowy",
|
|
152
|
-
"heavy-snow": "snowy",
|
|
153
|
-
"fog": "fog",
|
|
154
|
-
None: "exceptional", # For null or undefined conditions
|
|
155
|
-
}
|
|
156
|
-
|
|
157
|
-
# Default to 'exceptional' if the condition is not found in the mapping
|
|
158
|
-
return condition_mapping.get(api_condition, "exceptional")
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
2
|
Name: meteo_lt-pkg
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.3.0
|
|
4
4
|
Summary: A library to fetch weather data from api.meteo.lt
|
|
5
5
|
Author-email: Brunas <brunonas@gmail.com>
|
|
6
6
|
Project-URL: Homepage, https://github.com/Brunas/meteo_lt-pkg
|
|
@@ -23,6 +23,7 @@ Requires-Dist: flake8; extra == "dev"
|
|
|
23
23
|
Requires-Dist: pyflakes; extra == "dev"
|
|
24
24
|
Requires-Dist: pylint; extra == "dev"
|
|
25
25
|
Requires-Dist: build; extra == "dev"
|
|
26
|
+
Dynamic: license-file
|
|
26
27
|
|
|
27
28
|
# Meteo.Lt Lithuanian weather forecast package
|
|
28
29
|
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
meteo_lt/__init__.py,sha256=3RXg8MWNyXDJ4PpifsXRAT7t1mRNAJwSFlqJBmLeoPk,194
|
|
2
|
+
meteo_lt/api.py,sha256=oFpIqdOmVcSUdaMrnlbGV1k5w1XIdIJsKroXkczz8JE,1620
|
|
3
|
+
meteo_lt/models.py,sha256=1dRr1ICQBs-3W7_B_-hb0_lxcj32kR-gf3mVOWaiiuI,4042
|
|
4
|
+
meteo_lt/utils.py,sha256=SL7ZeTEfdrdQoe_DOJaiA2zVxt08ujyFJ24JxJm1Hks,1081
|
|
5
|
+
meteo_lt_pkg-0.3.0.dist-info/licenses/LICENSE,sha256=3IGi6xn6NUdXGvcdwD0MUbhy3Yz5NRnUjJrwKanFAD4,1073
|
|
6
|
+
meteo_lt_pkg-0.3.0.dist-info/METADATA,sha256=QiNE4LauSE-nX7WhQQD1k5azCP9U_R0n9OCmHIURYwg,5692
|
|
7
|
+
meteo_lt_pkg-0.3.0.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
8
|
+
meteo_lt_pkg-0.3.0.dist-info/top_level.txt,sha256=-aEdc9FzHhcIH4_0TNdKNxuvDnS3chKoJy6LK9Ud-G4,9
|
|
9
|
+
meteo_lt_pkg-0.3.0.dist-info/RECORD,,
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
meteo_lt/__init__.py,sha256=3RXg8MWNyXDJ4PpifsXRAT7t1mRNAJwSFlqJBmLeoPk,194
|
|
2
|
-
meteo_lt/api.py,sha256=oFpIqdOmVcSUdaMrnlbGV1k5w1XIdIJsKroXkczz8JE,1620
|
|
3
|
-
meteo_lt/models.py,sha256=brL4d0Mo4Fg29tKd13lxINygLL6EOQZJj6jOXrbP9Z0,5148
|
|
4
|
-
meteo_lt/utils.py,sha256=SL7ZeTEfdrdQoe_DOJaiA2zVxt08ujyFJ24JxJm1Hks,1081
|
|
5
|
-
meteo_lt_pkg-0.2.4.dist-info/LICENSE,sha256=3IGi6xn6NUdXGvcdwD0MUbhy3Yz5NRnUjJrwKanFAD4,1073
|
|
6
|
-
meteo_lt_pkg-0.2.4.dist-info/METADATA,sha256=vmOqwXFTRmqdyRG7VdRBl4TBc6Rau71cz3FiOqDHPdQ,5670
|
|
7
|
-
meteo_lt_pkg-0.2.4.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
|
|
8
|
-
meteo_lt_pkg-0.2.4.dist-info/top_level.txt,sha256=-aEdc9FzHhcIH4_0TNdKNxuvDnS3chKoJy6LK9Ud-G4,9
|
|
9
|
-
meteo_lt_pkg-0.2.4.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|