simple-dwd-weatherforecast 2.1.3__tar.gz → 2.1.4__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.
- {simple_dwd_weatherforecast-2.1.3/simple_dwd_weatherforecast.egg-info → simple_dwd_weatherforecast-2.1.4}/PKG-INFO +1 -1
- {simple_dwd_weatherforecast-2.1.3 → simple_dwd_weatherforecast-2.1.4}/setup.py +1 -1
- {simple_dwd_weatherforecast-2.1.3 → simple_dwd_weatherforecast-2.1.4}/simple_dwd_weatherforecast/dwdforecast.py +16 -6
- {simple_dwd_weatherforecast-2.1.3 → simple_dwd_weatherforecast-2.1.4/simple_dwd_weatherforecast.egg-info}/PKG-INFO +1 -1
- {simple_dwd_weatherforecast-2.1.3 → simple_dwd_weatherforecast-2.1.4}/LICENCE +0 -0
- {simple_dwd_weatherforecast-2.1.3 → simple_dwd_weatherforecast-2.1.4}/README.md +0 -0
- {simple_dwd_weatherforecast-2.1.3 → simple_dwd_weatherforecast-2.1.4}/setup.cfg +0 -0
- {simple_dwd_weatherforecast-2.1.3 → simple_dwd_weatherforecast-2.1.4}/simple_dwd_weatherforecast/__init__.py +0 -0
- {simple_dwd_weatherforecast-2.1.3 → simple_dwd_weatherforecast-2.1.4}/simple_dwd_weatherforecast/dwdmap.py +0 -0
- {simple_dwd_weatherforecast-2.1.3 → simple_dwd_weatherforecast-2.1.4}/simple_dwd_weatherforecast/stations.json +0 -0
- {simple_dwd_weatherforecast-2.1.3 → simple_dwd_weatherforecast-2.1.4}/simple_dwd_weatherforecast/uv_stations.json +0 -0
- {simple_dwd_weatherforecast-2.1.3 → simple_dwd_weatherforecast-2.1.4}/simple_dwd_weatherforecast.egg-info/SOURCES.txt +0 -0
- {simple_dwd_weatherforecast-2.1.3 → simple_dwd_weatherforecast-2.1.4}/simple_dwd_weatherforecast.egg-info/dependency_links.txt +0 -0
- {simple_dwd_weatherforecast-2.1.3 → simple_dwd_weatherforecast-2.1.4}/simple_dwd_weatherforecast.egg-info/requires.txt +0 -0
- {simple_dwd_weatherforecast-2.1.3 → simple_dwd_weatherforecast-2.1.4}/simple_dwd_weatherforecast.egg-info/top_level.txt +0 -0
- {simple_dwd_weatherforecast-2.1.3 → simple_dwd_weatherforecast-2.1.4}/tests/__init__.py +0 -0
- {simple_dwd_weatherforecast-2.1.3 → simple_dwd_weatherforecast-2.1.4}/tests/dummy_data.py +0 -0
- {simple_dwd_weatherforecast-2.1.3 → simple_dwd_weatherforecast-2.1.4}/tests/dummy_data_full.py +0 -0
- {simple_dwd_weatherforecast-2.1.3 → simple_dwd_weatherforecast-2.1.4}/tests/dummy_uv.py +0 -0
- {simple_dwd_weatherforecast-2.1.3 → simple_dwd_weatherforecast-2.1.4}/tests/test_get_daily_avg.py +0 -0
- {simple_dwd_weatherforecast-2.1.3 → simple_dwd_weatherforecast-2.1.4}/tests/test_get_daily_condition.py +0 -0
- {simple_dwd_weatherforecast-2.1.3 → simple_dwd_weatherforecast-2.1.4}/tests/test_get_daily_max.py +0 -0
- {simple_dwd_weatherforecast-2.1.3 → simple_dwd_weatherforecast-2.1.4}/tests/test_get_daily_min.py +0 -0
- {simple_dwd_weatherforecast-2.1.3 → simple_dwd_weatherforecast-2.1.4}/tests/test_get_daily_sum.py +0 -0
- {simple_dwd_weatherforecast-2.1.3 → simple_dwd_weatherforecast-2.1.4}/tests/test_get_day_values.py +0 -0
- {simple_dwd_weatherforecast-2.1.3 → simple_dwd_weatherforecast-2.1.4}/tests/test_get_forecast_condition.py +0 -0
- {simple_dwd_weatherforecast-2.1.3 → simple_dwd_weatherforecast-2.1.4}/tests/test_get_forecast_data.py +0 -0
- {simple_dwd_weatherforecast-2.1.3 → simple_dwd_weatherforecast-2.1.4}/tests/test_get_station_name.py +0 -0
- {simple_dwd_weatherforecast-2.1.3 → simple_dwd_weatherforecast-2.1.4}/tests/test_get_timeframe_avg.py +0 -0
- {simple_dwd_weatherforecast-2.1.3 → simple_dwd_weatherforecast-2.1.4}/tests/test_get_timeframe_condition.py +0 -0
- {simple_dwd_weatherforecast-2.1.3 → simple_dwd_weatherforecast-2.1.4}/tests/test_get_timeframe_max.py +0 -0
- {simple_dwd_weatherforecast-2.1.3 → simple_dwd_weatherforecast-2.1.4}/tests/test_get_timeframe_min.py +0 -0
- {simple_dwd_weatherforecast-2.1.3 → simple_dwd_weatherforecast-2.1.4}/tests/test_get_timeframe_sum.py +0 -0
- {simple_dwd_weatherforecast-2.1.3 → simple_dwd_weatherforecast-2.1.4}/tests/test_get_timeframe_values.py +0 -0
- {simple_dwd_weatherforecast-2.1.3 → simple_dwd_weatherforecast-2.1.4}/tests/test_is_in_timerange.py +0 -0
- {simple_dwd_weatherforecast-2.1.3 → simple_dwd_weatherforecast-2.1.4}/tests/test_is_valid_timeframe.py +0 -0
- {simple_dwd_weatherforecast-2.1.3 → simple_dwd_weatherforecast-2.1.4}/tests/test_location_tools.py +0 -0
- {simple_dwd_weatherforecast-2.1.3 → simple_dwd_weatherforecast-2.1.4}/tests/test_map.py +0 -0
- {simple_dwd_weatherforecast-2.1.3 → simple_dwd_weatherforecast-2.1.4}/tests/test_parsekml.py +0 -0
- {simple_dwd_weatherforecast-2.1.3 → simple_dwd_weatherforecast-2.1.4}/tests/test_region.py +0 -0
- {simple_dwd_weatherforecast-2.1.3 → simple_dwd_weatherforecast-2.1.4}/tests/test_reported_weather.py +0 -0
- {simple_dwd_weatherforecast-2.1.3 → simple_dwd_weatherforecast-2.1.4}/tests/test_station.py +0 -0
- {simple_dwd_weatherforecast-2.1.3 → simple_dwd_weatherforecast-2.1.4}/tests/test_stationsfile.py +0 -0
- {simple_dwd_weatherforecast-2.1.3 → simple_dwd_weatherforecast-2.1.4}/tests/test_update.py +0 -0
- {simple_dwd_weatherforecast-2.1.3 → simple_dwd_weatherforecast-2.1.4}/tests/test_update_hourly.py +0 -0
- {simple_dwd_weatherforecast-2.1.3 → simple_dwd_weatherforecast-2.1.4}/tests/test_uv_index.py +0 -0
- {simple_dwd_weatherforecast-2.1.3 → simple_dwd_weatherforecast-2.1.4}/tests/test_weather.py +0 -0
@@ -5,7 +5,7 @@ with open("README.md", "r") as fh:
|
|
5
5
|
|
6
6
|
setuptools.setup(
|
7
7
|
name="simple_dwd_weatherforecast",
|
8
|
-
version="2.1.
|
8
|
+
version="2.1.4",
|
9
9
|
author="Max Fermor",
|
10
10
|
description="A simple tool to retrieve a weather forecast from DWD OpenData",
|
11
11
|
long_description=long_description,
|
@@ -951,21 +951,31 @@ class Weather:
|
|
951
951
|
except Exception as error:
|
952
952
|
print(f"Error in download_latest_kml: {type(error)} args: {error.args}")
|
953
953
|
|
954
|
-
def get_chunks(self):
|
955
|
-
def zipped_chunks():
|
954
|
+
def get_chunks(self, url):
|
955
|
+
def zipped_chunks(url):
|
956
956
|
# Iterable that yields the bytes of a zip file
|
957
957
|
with httpx.stream(
|
958
958
|
"GET",
|
959
|
-
|
959
|
+
url,
|
960
960
|
) as r:
|
961
|
-
|
961
|
+
self.etags[url] = r.headers["etag"] # type: ignore
|
962
|
+
yield from r.iter_bytes(chunk_size=171072)
|
962
963
|
|
963
|
-
return stream_unzip(zipped_chunks())
|
964
|
+
return stream_unzip(zipped_chunks(url))
|
964
965
|
|
965
966
|
def download_large_kml(self, stationid):
|
966
967
|
placemark = b""
|
968
|
+
url = "https://opendata.dwd.de/weather/local_forecasts/mos/MOSMIX_S/all_stations/kml/MOSMIX_S_LATEST_240.kmz"
|
969
|
+
# Check if content has updated
|
970
|
+
headers = {"If-None-Match": self.etags[url] if url in self.etags else ""} # type: ignore
|
971
|
+
r = httpx.head(
|
972
|
+
url,
|
973
|
+
headers=headers,
|
974
|
+
)
|
975
|
+
if r.status_code == 304:
|
976
|
+
return
|
967
977
|
|
968
|
-
for file_name, file_size, unzipped_chunks in self.get_chunks():
|
978
|
+
for file_name, file_size, unzipped_chunks in self.get_chunks(url):
|
969
979
|
chunk1 = b""
|
970
980
|
chunk2 = b""
|
971
981
|
first_chunk = None
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{simple_dwd_weatherforecast-2.1.3 → simple_dwd_weatherforecast-2.1.4}/tests/dummy_data_full.py
RENAMED
File without changes
|
File without changes
|
{simple_dwd_weatherforecast-2.1.3 → simple_dwd_weatherforecast-2.1.4}/tests/test_get_daily_avg.py
RENAMED
File without changes
|
File without changes
|
{simple_dwd_weatherforecast-2.1.3 → simple_dwd_weatherforecast-2.1.4}/tests/test_get_daily_max.py
RENAMED
File without changes
|
{simple_dwd_weatherforecast-2.1.3 → simple_dwd_weatherforecast-2.1.4}/tests/test_get_daily_min.py
RENAMED
File without changes
|
{simple_dwd_weatherforecast-2.1.3 → simple_dwd_weatherforecast-2.1.4}/tests/test_get_daily_sum.py
RENAMED
File without changes
|
{simple_dwd_weatherforecast-2.1.3 → simple_dwd_weatherforecast-2.1.4}/tests/test_get_day_values.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
{simple_dwd_weatherforecast-2.1.3 → simple_dwd_weatherforecast-2.1.4}/tests/test_get_station_name.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{simple_dwd_weatherforecast-2.1.3 → simple_dwd_weatherforecast-2.1.4}/tests/test_is_in_timerange.py
RENAMED
File without changes
|
File without changes
|
{simple_dwd_weatherforecast-2.1.3 → simple_dwd_weatherforecast-2.1.4}/tests/test_location_tools.py
RENAMED
File without changes
|
File without changes
|
{simple_dwd_weatherforecast-2.1.3 → simple_dwd_weatherforecast-2.1.4}/tests/test_parsekml.py
RENAMED
File without changes
|
File without changes
|
{simple_dwd_weatherforecast-2.1.3 → simple_dwd_weatherforecast-2.1.4}/tests/test_reported_weather.py
RENAMED
File without changes
|
File without changes
|
{simple_dwd_weatherforecast-2.1.3 → simple_dwd_weatherforecast-2.1.4}/tests/test_stationsfile.py
RENAMED
File without changes
|
File without changes
|
{simple_dwd_weatherforecast-2.1.3 → simple_dwd_weatherforecast-2.1.4}/tests/test_update_hourly.py
RENAMED
File without changes
|
{simple_dwd_weatherforecast-2.1.3 → simple_dwd_weatherforecast-2.1.4}/tests/test_uv_index.py
RENAMED
File without changes
|
File without changes
|