hamsclientfork 0.2.17__tar.gz → 0.2.19__tar.gz
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.
- {hamsclientfork-0.2.17/hamsclientfork.egg-info → hamsclientfork-0.2.19}/PKG-INFO +1 -1
- {hamsclientfork-0.2.17 → hamsclientfork-0.2.19}/hamsclientfork/client.py +7 -3
- {hamsclientfork-0.2.17 → hamsclientfork-0.2.19/hamsclientfork.egg-info}/PKG-INFO +1 -1
- {hamsclientfork-0.2.17 → hamsclientfork-0.2.19}/setup.py +1 -1
- {hamsclientfork-0.2.17 → hamsclientfork-0.2.19}/.gitignore +0 -0
- {hamsclientfork-0.2.17 → hamsclientfork-0.2.19}/LICENSE +0 -0
- {hamsclientfork-0.2.17 → hamsclientfork-0.2.19}/README.md +0 -0
- {hamsclientfork-0.2.17 → hamsclientfork-0.2.19}/README.rst +0 -0
- {hamsclientfork-0.2.17 → hamsclientfork-0.2.19}/hamsclientfork/__init__.py +0 -0
- {hamsclientfork-0.2.17 → hamsclientfork-0.2.19}/hamsclientfork/__main__.py +0 -0
- {hamsclientfork-0.2.17 → hamsclientfork-0.2.19}/hamsclientfork/py.typed +0 -0
- {hamsclientfork-0.2.17 → hamsclientfork-0.2.19}/hamsclientfork.egg-info/SOURCES.txt +0 -0
- {hamsclientfork-0.2.17 → hamsclientfork-0.2.19}/hamsclientfork.egg-info/dependency_links.txt +0 -0
- {hamsclientfork-0.2.17 → hamsclientfork-0.2.19}/hamsclientfork.egg-info/requires.txt +0 -0
- {hamsclientfork-0.2.17 → hamsclientfork-0.2.19}/hamsclientfork.egg-info/top_level.txt +0 -0
- {hamsclientfork-0.2.17 → hamsclientfork-0.2.19}/setup.cfg +0 -0
- {hamsclientfork-0.2.17 → hamsclientfork-0.2.19}/tox.ini +0 -0
|
@@ -29,7 +29,7 @@ _HEADERS = {
|
|
|
29
29
|
}
|
|
30
30
|
|
|
31
31
|
MS_BASE_URL = "https://www.meteosuisse.admin.ch"
|
|
32
|
-
JSON_FORECAST_URL = "https://app-prod-ws.meteoswiss-app.ch/
|
|
32
|
+
JSON_FORECAST_URL = "https://app-prod-ws.meteoswiss-app.ch/v2/forecast?plz={}00&graph_startLowResolution=true&warning=true"
|
|
33
33
|
MS_SEARCH_URL = "https://www.meteosuisse.admin.ch/home/actualite/infos.html?ort={}&pageIndex=0&tab=search_tab"
|
|
34
34
|
CURRENT_CONDITION_URL = (
|
|
35
35
|
"https://data.geo.admin.ch/ch.meteoschweiz.messwerte-aktuell/VQHA80.csv"
|
|
@@ -192,7 +192,7 @@ def CurrentCondition_from_meteoswiss_data(data: dict[str, Any]) -> CurrentCondit
|
|
|
192
192
|
|
|
193
193
|
class ClientResult(TypedDict):
|
|
194
194
|
name: str
|
|
195
|
-
forecast: Forecast
|
|
195
|
+
forecast: Forecast | None
|
|
196
196
|
# A list of current conditions for the first station passed.
|
|
197
197
|
condition: list[CurrentCondition]
|
|
198
198
|
# A dictionary of station -> list of the current precipitation
|
|
@@ -201,9 +201,13 @@ class ClientResult(TypedDict):
|
|
|
201
201
|
|
|
202
202
|
|
|
203
203
|
def ClientResult_from_meteoswiss_data(data: dict[str, Any]) -> ClientResult:
|
|
204
|
+
if not data["forecast"].get("plz"): # PLZ came back as zero or None, no forecast
|
|
205
|
+
forecast = None
|
|
206
|
+
else:
|
|
207
|
+
forecast = Forecast_from_meteoswiss_data(data["forecast"])
|
|
204
208
|
return ClientResult(
|
|
205
209
|
name=data["name"],
|
|
206
|
-
forecast=
|
|
210
|
+
forecast=forecast,
|
|
207
211
|
condition=[CurrentCondition_from_meteoswiss_data(x) for x in data["condition"]],
|
|
208
212
|
condition_by_station={
|
|
209
213
|
station: CurrentCondition_from_meteoswiss_data(condition)
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{hamsclientfork-0.2.17 → hamsclientfork-0.2.19}/hamsclientfork.egg-info/dependency_links.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|