pyastroweatherio 0.72.0.dev1__tar.gz → 0.73.0.dev1__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.
- {pyastroweatherio-0.72.0.dev1 → pyastroweatherio-0.73.0.dev1}/PKG-INFO +5 -5
- {pyastroweatherio-0.72.0.dev1 → pyastroweatherio-0.73.0.dev1}/README.md +1 -1
- {pyastroweatherio-0.72.0.dev1 → pyastroweatherio-0.73.0.dev1}/pyastroweatherio/__init__.py +1 -1
- {pyastroweatherio-0.72.0.dev1 → pyastroweatherio-0.73.0.dev1}/pyastroweatherio/client.py +40 -186
- {pyastroweatherio-0.72.0.dev1 → pyastroweatherio-0.73.0.dev1}/pyastroweatherio/const.py +0 -5
- {pyastroweatherio-0.72.0.dev1 → pyastroweatherio-0.73.0.dev1}/pyastroweatherio/dataclasses.py +0 -16
- {pyastroweatherio-0.72.0.dev1 → pyastroweatherio-0.73.0.dev1}/pyastroweatherio/helper_functions.py +0 -5
- {pyastroweatherio-0.72.0.dev1 → pyastroweatherio-0.73.0.dev1}/pyastroweatherio.egg-info/PKG-INFO +5 -5
- {pyastroweatherio-0.72.0.dev1 → pyastroweatherio-0.73.0.dev1}/pyastroweatherio.egg-info/requires.txt +1 -1
- {pyastroweatherio-0.72.0.dev1 → pyastroweatherio-0.73.0.dev1}/setup.py +4 -4
- {pyastroweatherio-0.72.0.dev1 → pyastroweatherio-0.73.0.dev1}/LICENSE +0 -0
- {pyastroweatherio-0.72.0.dev1 → pyastroweatherio-0.73.0.dev1}/pyastroweatherio/errors.py +0 -0
- {pyastroweatherio-0.72.0.dev1 → pyastroweatherio-0.73.0.dev1}/pyastroweatherio.egg-info/SOURCES.txt +0 -0
- {pyastroweatherio-0.72.0.dev1 → pyastroweatherio-0.73.0.dev1}/pyastroweatherio.egg-info/dependency_links.txt +0 -0
- {pyastroweatherio-0.72.0.dev1 → pyastroweatherio-0.73.0.dev1}/pyastroweatherio.egg-info/top_level.txt +0 -0
- {pyastroweatherio-0.72.0.dev1 → pyastroweatherio-0.73.0.dev1}/setup.cfg +0 -0
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: pyastroweatherio
|
|
3
|
-
Version: 0.
|
|
4
|
-
Summary: Python Wrapper for
|
|
3
|
+
Version: 0.73.0.dev1
|
|
4
|
+
Summary: Python Wrapper for OpenMeteo and Met.no REST API
|
|
5
5
|
Home-page: https://github.com/mawinkler/pyastroweatherio
|
|
6
6
|
Author: Markus Winkler
|
|
7
7
|
Author-email: winkler.info@icloud.com
|
|
8
8
|
License: MIT
|
|
9
|
-
Keywords: AstroWeather,
|
|
9
|
+
Keywords: AstroWeather,Met.no,OpenMeteo,Python
|
|
10
10
|
Classifier: Development Status :: 4 - Beta
|
|
11
11
|
Classifier: Intended Audience :: Developers
|
|
12
12
|
Classifier: Topic :: Software Development :: Build Tools
|
|
@@ -28,7 +28,7 @@ Requires-Dist: pytz>=2024.2
|
|
|
28
28
|
Requires-Dist: setuptools>=75.1
|
|
29
29
|
Requires-Dist: typeguard>=4.3
|
|
30
30
|
Requires-Dist: openmeteo-requests~=1.3
|
|
31
|
-
Requires-Dist: pandas
|
|
31
|
+
Requires-Dist: pandas~=2.2
|
|
32
32
|
Requires-Dist: tabulate~=0.9
|
|
33
33
|
Dynamic: author
|
|
34
34
|
Dynamic: author-email
|
|
@@ -41,4 +41,4 @@ Dynamic: license-file
|
|
|
41
41
|
Dynamic: requires-dist
|
|
42
42
|
Dynamic: summary
|
|
43
43
|
|
|
44
|
-
Lightweight Python 3 module to receive data via REST API from
|
|
44
|
+
Lightweight Python 3 module to receive data via REST API from OpenMeteo and Met.no and consume UpTonight reports.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# pyAstroWeatherIO
|
|
2
2
|
|
|
3
|
-
Wrapper for the ***MET Norway Weather
|
|
3
|
+
Wrapper for the ***MET Norway Weather*** and ***Open-Meteo*** RESTful APIs. Designed to work with Home Assistant and the custom [AstroWeather](https://github.com/mawinkler/astroweather) integration.
|
|
4
4
|
|
|
5
5
|
In addition to the weather data, some calculations for the astronomical twilight and Moon setting, rising and phase are implemented. They indicate the darkness you can expect the upcoming night.
|
|
6
6
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"""Define a client to interact with
|
|
1
|
+
"""Define a client to interact with weather APIs."""
|
|
2
2
|
|
|
3
3
|
import asyncio
|
|
4
4
|
import json
|
|
@@ -26,7 +26,6 @@ from typeguard import typechecked
|
|
|
26
26
|
|
|
27
27
|
from pyastroweatherio.const import (
|
|
28
28
|
BASE_URL_MET,
|
|
29
|
-
BASE_URL_SEVENTIMER,
|
|
30
29
|
BASE_URL_OPENMETEO,
|
|
31
30
|
DEFAULT_CACHE_TIMEOUT,
|
|
32
31
|
DEFAULT_CONDITION_CALM_WEIGHT,
|
|
@@ -44,7 +43,6 @@ from pyastroweatherio.const import (
|
|
|
44
43
|
DEFAULT_TIMEZONE,
|
|
45
44
|
FORECAST_TYPE_HOURLY,
|
|
46
45
|
HEADERS,
|
|
47
|
-
LIFTED_INDEX_7TIMER_MAPPING,
|
|
48
46
|
MAG_DEGRATION_MAX,
|
|
49
47
|
SEEING,
|
|
50
48
|
SEEING_MAX,
|
|
@@ -126,7 +124,7 @@ class AstroWeather:
|
|
|
126
124
|
self._calm_weight = calm_weight
|
|
127
125
|
self._uptonight_path = uptonight_path
|
|
128
126
|
self._test_datetime = test_datetime
|
|
129
|
-
self._experimental_features =
|
|
127
|
+
self._experimental_features = True
|
|
130
128
|
self._forecast_model = forecast_model
|
|
131
129
|
# Open-Meteo
|
|
132
130
|
# DWD Germany: icon_seamless
|
|
@@ -245,46 +243,41 @@ class AstroWeather:
|
|
|
245
243
|
if weather_df_metno is None:
|
|
246
244
|
_LOGGER.warning("Could not retrieve Met.no data. Using existing data.")
|
|
247
245
|
return None
|
|
248
|
-
weather_df_seventimer = await self._retrieve_data_seventimer()
|
|
249
246
|
await self._retrieve_data_uptonight()
|
|
250
247
|
|
|
251
|
-
|
|
252
|
-
weather_df_openmeteo = await self._retrieve_data_openmeteo()
|
|
248
|
+
weather_df_openmeteo = await self._retrieve_data_openmeteo()
|
|
253
249
|
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
250
|
+
# Merge the dataframes of metno and openmeteo
|
|
251
|
+
self._weather_df = weather_df_metno.merge(
|
|
252
|
+
weather_df_openmeteo, on="time", how="left"
|
|
253
|
+
)
|
|
258
254
|
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
else:
|
|
286
|
-
# Merge the dataframes of metno and seventimer
|
|
287
|
-
self._weather_df = weather_df_metno.merge(weather_df_seventimer, on="time", how="left")
|
|
255
|
+
# Overwrite met.no forecast with open-meteo forcast
|
|
256
|
+
self._weather_df["cloud_area_fraction"] = self._weather_df["openmeteo_cloud_cover"]
|
|
257
|
+
self._weather_df["cloud_area_fraction_high"] = self._weather_df["openmeteo_cloud_cover_high"]
|
|
258
|
+
self._weather_df["cloud_area_fraction_medium"] = self._weather_df["openmeteo_cloud_cover_mid"]
|
|
259
|
+
self._weather_df["cloud_area_fraction_low"] = self._weather_df["openmeteo_cloud_cover_low"]
|
|
260
|
+
self._weather_df["relative_humidity"] = self._weather_df["openmeteo_relative_humidity_2m"]
|
|
261
|
+
self._weather_df["wind_speed"] = self._weather_df["openmeteo_wind_speed_10m"]
|
|
262
|
+
self._weather_df["wind_from_direction"] = self._weather_df["openmeteo_wind_direction_10m"]
|
|
263
|
+
self._weather_df["air_temperature"] = self._weather_df["openmeteo_temperature_2m"]
|
|
264
|
+
self._weather_df["dew_point_temperature"] = self._weather_df["openmeteo_dew_point_2m"]
|
|
265
|
+
self._weather_df["precipitation_amount"] = self._weather_df["openmeteo_precipitation"]
|
|
266
|
+
self._weather_df = self._weather_df.drop(
|
|
267
|
+
[
|
|
268
|
+
"openmeteo_cloud_cover",
|
|
269
|
+
"openmeteo_cloud_cover_high",
|
|
270
|
+
"openmeteo_cloud_cover_mid",
|
|
271
|
+
"openmeteo_cloud_cover_low",
|
|
272
|
+
"openmeteo_relative_humidity_2m",
|
|
273
|
+
"openmeteo_wind_speed_10m",
|
|
274
|
+
"openmeteo_wind_direction_10m",
|
|
275
|
+
"openmeteo_temperature_2m",
|
|
276
|
+
"openmeteo_dew_point_2m",
|
|
277
|
+
"openmeteo_precipitation",
|
|
278
|
+
],
|
|
279
|
+
axis=1,
|
|
280
|
+
)
|
|
288
281
|
|
|
289
282
|
# Clean up rows with missing values
|
|
290
283
|
self._weather_df = self._weather_df.dropna(subset=["air_temperature"])
|
|
@@ -306,20 +299,10 @@ class AstroWeather:
|
|
|
306
299
|
)
|
|
307
300
|
self._weather_df["dew_point_temperature"] = await self._calculate_dew_point(self._weather_df)
|
|
308
301
|
|
|
309
|
-
#
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
self._weather_df["transparency"] = await self._calculate_transparency(self._weather_df)
|
|
314
|
-
self._weather_df["lifted_index"] = await self._calculate_lifted_index(self._weather_df)
|
|
315
|
-
else:
|
|
316
|
-
# 7Timer delivers three hourly data only, so we fill the missing data here
|
|
317
|
-
self._weather_df["seeing"] = self._weather_df["seeing"].ffill()
|
|
318
|
-
self._weather_df["transparency"] = self._weather_df["transparency"].ffill()
|
|
319
|
-
self._weather_df["lifted_index"] = self._weather_df["lifted_index"].ffill()
|
|
320
|
-
self._weather_df["seeing"] = self._weather_df["seeing"].bfill()
|
|
321
|
-
self._weather_df["transparency"] = self._weather_df["transparency"].bfill()
|
|
322
|
-
self._weather_df["lifted_index"] = self._weather_df["lifted_index"].bfill()
|
|
302
|
+
# Calculate atmosphere
|
|
303
|
+
self._weather_df["seeing"] = await self._calculate_seeing(self._weather_df)
|
|
304
|
+
self._weather_df["transparency"] = await self._calculate_transparency(self._weather_df)
|
|
305
|
+
self._weather_df["lifted_index"] = await self._calculate_lifted_index(self._weather_df)
|
|
323
306
|
|
|
324
307
|
self._test_weather_df()
|
|
325
308
|
else:
|
|
@@ -381,11 +364,8 @@ class AstroWeather:
|
|
|
381
364
|
transparency = float(row["transparency"])
|
|
382
365
|
lifted_index = float(row["lifted_index"])
|
|
383
366
|
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
fog2m = await self._atmosphere.calculate_fog_density(temp2m, rh2m, dewpoint2m, wind_speed) * 100
|
|
387
|
-
else:
|
|
388
|
-
fog2m = fog
|
|
367
|
+
# Calculate Fog Density
|
|
368
|
+
fog2m = await self._atmosphere.calculate_fog_density(temp2m, rh2m, dewpoint2m, wind_speed) * 100
|
|
389
369
|
|
|
390
370
|
condition = ConditionDataModel(
|
|
391
371
|
{
|
|
@@ -991,132 +971,6 @@ class AstroWeather:
|
|
|
991
971
|
|
|
992
972
|
return items
|
|
993
973
|
|
|
994
|
-
# #########################################################################
|
|
995
|
-
# 7Timer
|
|
996
|
-
# #########################################################################
|
|
997
|
-
async def _retrieve_data_seventimer(self) -> None:
|
|
998
|
-
"""Retrieves current data from 7timer."""
|
|
999
|
-
|
|
1000
|
-
_LOGGER.debug("Updating data from 7Timer")
|
|
1001
|
-
|
|
1002
|
-
astro_dataseries = {}
|
|
1003
|
-
|
|
1004
|
-
# Testing
|
|
1005
|
-
if not self._experimental_features:
|
|
1006
|
-
if self._test_mode:
|
|
1007
|
-
if os.path.isfile("debug/astro.json"):
|
|
1008
|
-
_LOGGER.debug("Reading 7Timer from file")
|
|
1009
|
-
with open("debug/astro.json") as json_file:
|
|
1010
|
-
astro_dataseries_json = json.load(json_file)
|
|
1011
|
-
astro_dataseries = astro_dataseries_json.get("dataseries", {})
|
|
1012
|
-
json_data_astro = {"init": astro_dataseries_json.get("init")}
|
|
1013
|
-
else:
|
|
1014
|
-
json_data_astro = await self._async_request_seventimer()
|
|
1015
|
-
astro_dataseries = json_data_astro.get("dataseries", {})
|
|
1016
|
-
else:
|
|
1017
|
-
json_data_astro = await self._async_request_seventimer()
|
|
1018
|
-
astro_dataseries = json_data_astro.get("dataseries", {})
|
|
1019
|
-
|
|
1020
|
-
if astro_dataseries != {} and not self._experimental_features:
|
|
1021
|
-
cnv = ConversionFunctions()
|
|
1022
|
-
seventimer_init = await cnv.anchor_timestamp(json_data_astro.get("init"))
|
|
1023
|
-
|
|
1024
|
-
# Flattening the data into a list of records
|
|
1025
|
-
records = []
|
|
1026
|
-
for entry in astro_dataseries:
|
|
1027
|
-
time = (seventimer_init + timedelta(hours=entry["timepoint"])).replace(
|
|
1028
|
-
microsecond=0, tzinfo=timezone.utc
|
|
1029
|
-
)
|
|
1030
|
-
instant_details = {}
|
|
1031
|
-
instant_details["seeing"] = SEEING[max(0, min(7, int(entry["seeing"] - 1)))]
|
|
1032
|
-
instant_details["transparency"] = TRANSPARENCY[max(0, min(7, int(entry["transparency"] - 1)))]
|
|
1033
|
-
instant_details["lifted_index"] = LIFTED_INDEX_7TIMER_MAPPING[entry["lifted_index"]]
|
|
1034
|
-
|
|
1035
|
-
# Adding all details to a single record
|
|
1036
|
-
record = {
|
|
1037
|
-
"time": time,
|
|
1038
|
-
**instant_details,
|
|
1039
|
-
}
|
|
1040
|
-
records.append(record)
|
|
1041
|
-
|
|
1042
|
-
# Convert to DataFrame
|
|
1043
|
-
weather_df_seventimer = pd.DataFrame(records)
|
|
1044
|
-
else:
|
|
1045
|
-
# Fake 7timer weather data if service is broken
|
|
1046
|
-
# This eliminates consideration of seeing, transparency, and lifted_index
|
|
1047
|
-
# and switches automatically to experimental functions.
|
|
1048
|
-
records = []
|
|
1049
|
-
now = datetime.now(UTC)
|
|
1050
|
-
|
|
1051
|
-
for index in range(0, 20):
|
|
1052
|
-
time = (now + timedelta(hours=index * 3)).replace(
|
|
1053
|
-
minute=0, second=0, microsecond=0, tzinfo=timezone.utc
|
|
1054
|
-
)
|
|
1055
|
-
instant_details = {}
|
|
1056
|
-
instant_details["seeing"] = _NOT_AVAILABLE
|
|
1057
|
-
instant_details["transparency"] = _NOT_AVAILABLE
|
|
1058
|
-
instant_details["lifted_index"] = _NOT_AVAILABLE
|
|
1059
|
-
|
|
1060
|
-
# Adding all details to a single record
|
|
1061
|
-
record = {
|
|
1062
|
-
"time": time,
|
|
1063
|
-
**instant_details,
|
|
1064
|
-
}
|
|
1065
|
-
records.append(record)
|
|
1066
|
-
|
|
1067
|
-
# Convert to DataFrame
|
|
1068
|
-
weather_df_seventimer = pd.DataFrame(records)
|
|
1069
|
-
|
|
1070
|
-
return weather_df_seventimer
|
|
1071
|
-
|
|
1072
|
-
@typechecked
|
|
1073
|
-
async def _async_request_seventimer(self) -> Dict:
|
|
1074
|
-
"""Make a request against the 7timer API."""
|
|
1075
|
-
|
|
1076
|
-
use_running_session = self._session and not self._session.closed
|
|
1077
|
-
|
|
1078
|
-
if use_running_session:
|
|
1079
|
-
session = self._session
|
|
1080
|
-
else:
|
|
1081
|
-
session = ClientSession(timeout=ClientTimeout(total=DEFAULT_TIMEOUT))
|
|
1082
|
-
|
|
1083
|
-
# BASE_URL_SEVENTIMER = "https://www.7timer.info/bin/api.pl?lon=XX.XX&lat=YY.YY&product=astro&output=json"
|
|
1084
|
-
url = (
|
|
1085
|
-
str(f"{BASE_URL_SEVENTIMER}")
|
|
1086
|
-
+ "?lon="
|
|
1087
|
-
+ str("%.1f" % round(self._location_data.longitude, 2))
|
|
1088
|
-
+ "&lat="
|
|
1089
|
-
+ str("%.1f" % round(self._location_data.latitude, 2))
|
|
1090
|
-
+ "&product=astro"
|
|
1091
|
-
+ "&output=json"
|
|
1092
|
-
)
|
|
1093
|
-
try:
|
|
1094
|
-
_LOGGER.debug(f"Query url: {url}")
|
|
1095
|
-
async with session.request("get", url, headers=HEADERS, ssl=False) as resp:
|
|
1096
|
-
resp.raise_for_status()
|
|
1097
|
-
plain = str(await resp.text()).replace("\n", " ")
|
|
1098
|
-
data = json.loads(plain)
|
|
1099
|
-
|
|
1100
|
-
if self._test_mode:
|
|
1101
|
-
json_string = json.dumps(data)
|
|
1102
|
-
with open("debug/astro.json", "w") as outfile:
|
|
1103
|
-
outfile.write(json_string)
|
|
1104
|
-
|
|
1105
|
-
return data
|
|
1106
|
-
except JSONDecodeError as jsonerr:
|
|
1107
|
-
_LOGGER.error(f"JSON decode error, expecting value: {jsonerr}")
|
|
1108
|
-
return {}
|
|
1109
|
-
except asyncio.TimeoutError as tex:
|
|
1110
|
-
_LOGGER.error(f"Request to endpoint timed out: {tex}")
|
|
1111
|
-
return {}
|
|
1112
|
-
except ClientError as err:
|
|
1113
|
-
_LOGGER.error(f"Error requesting data: {err}")
|
|
1114
|
-
return {}
|
|
1115
|
-
|
|
1116
|
-
finally:
|
|
1117
|
-
if not use_running_session:
|
|
1118
|
-
await session.close()
|
|
1119
|
-
|
|
1120
974
|
# #########################################################################
|
|
1121
975
|
# Met.no
|
|
1122
976
|
# #########################################################################
|
|
@@ -1177,7 +1031,7 @@ class AstroWeather:
|
|
|
1177
1031
|
|
|
1178
1032
|
@typechecked
|
|
1179
1033
|
async def _async_request_met(self) -> Dict:
|
|
1180
|
-
"""Make a request against the
|
|
1034
|
+
"""Make a request against the Met.no API."""
|
|
1181
1035
|
|
|
1182
1036
|
use_running_session = self._session and not self._session.closed
|
|
1183
1037
|
|
|
@@ -5,7 +5,6 @@
|
|
|
5
5
|
# #####################################################
|
|
6
6
|
BASE_URL_OPENMETEO = "https://api.open-meteo.com/v1/forecast"
|
|
7
7
|
BASE_URL_MET = "https://api.met.no/weatherapi/locationforecast/2.0/complete"
|
|
8
|
-
BASE_URL_SEVENTIMER = "https://www.7timer.info/bin/api.pl"
|
|
9
8
|
HEADERS = {"User-Agent": "AstroWeather github.com/mawinkler/astroweather"}
|
|
10
9
|
|
|
11
10
|
# #####################################################
|
|
@@ -120,10 +119,6 @@ LIFTED_INDEX_PLAIN = [
|
|
|
120
119
|
"Over 6, very stable",
|
|
121
120
|
]
|
|
122
121
|
|
|
123
|
-
LIFTED_INDEX_7TIMER_KEYS = [-10, -6, -4, -1, 2, 6, 10, 15]
|
|
124
|
-
LIFTED_INDEX_7TIMER_VALUES = [-7, -6, -4, -1.5, 0, 1.5, 4, 7]
|
|
125
|
-
LIFTED_INDEX_7TIMER_MAPPING = dict(zip(LIFTED_INDEX_7TIMER_KEYS, LIFTED_INDEX_7TIMER_VALUES))
|
|
126
|
-
|
|
127
122
|
# #####################################################
|
|
128
123
|
# Wind
|
|
129
124
|
# #####################################################
|
{pyastroweatherio-0.72.0.dev1 → pyastroweatherio-0.73.0.dev1}/pyastroweatherio/dataclasses.py
RENAMED
|
@@ -497,14 +497,6 @@ class LocationData:
|
|
|
497
497
|
# #########################################################################
|
|
498
498
|
# Time data
|
|
499
499
|
# #########################################################################
|
|
500
|
-
@property
|
|
501
|
-
def seventimer_init(self) -> datetime:
|
|
502
|
-
return self.time_data.seventimer_init
|
|
503
|
-
|
|
504
|
-
@property
|
|
505
|
-
def seventimer_timepoint(self) -> int:
|
|
506
|
-
return self.time_data.seventimer_timepoint
|
|
507
|
-
|
|
508
500
|
@property
|
|
509
501
|
def forecast_time(self) -> datetime:
|
|
510
502
|
return self.time_data.forecast_time
|
|
@@ -1007,14 +999,6 @@ class ForecastData:
|
|
|
1007
999
|
# #########################################################################
|
|
1008
1000
|
# Time data
|
|
1009
1001
|
# #########################################################################
|
|
1010
|
-
@property
|
|
1011
|
-
def seventimer_init(self) -> datetime:
|
|
1012
|
-
return self.time_data.seventimer_init
|
|
1013
|
-
|
|
1014
|
-
@property
|
|
1015
|
-
def seventimer_timepoint(self) -> int:
|
|
1016
|
-
return self.time_data.seventimer_timepoint
|
|
1017
|
-
|
|
1018
1002
|
@property
|
|
1019
1003
|
def forecast_time(self) -> datetime:
|
|
1020
1004
|
return self.time_data.forecast_time
|
{pyastroweatherio-0.72.0.dev1 → pyastroweatherio-0.73.0.dev1}/pyastroweatherio/helper_functions.py
RENAMED
|
@@ -40,11 +40,6 @@ class ConversionFunctions:
|
|
|
40
40
|
|
|
41
41
|
return datetime.datetime.fromtimestamp(int(value)).strftime("%Y-%m-%d %H:%M:%S")
|
|
42
42
|
|
|
43
|
-
async def anchor_timestamp(self, value) -> datetime:
|
|
44
|
-
"""Converts the datetime string from 7Timer to DateTime."""
|
|
45
|
-
|
|
46
|
-
return datetime.strptime(value, "%Y%m%d%H")
|
|
47
|
-
|
|
48
43
|
|
|
49
44
|
class AtmosphericRoutines:
|
|
50
45
|
"""Calculate atmospheric attributes."""
|
{pyastroweatherio-0.72.0.dev1 → pyastroweatherio-0.73.0.dev1}/pyastroweatherio.egg-info/PKG-INFO
RENAMED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: pyastroweatherio
|
|
3
|
-
Version: 0.
|
|
4
|
-
Summary: Python Wrapper for
|
|
3
|
+
Version: 0.73.0.dev1
|
|
4
|
+
Summary: Python Wrapper for OpenMeteo and Met.no REST API
|
|
5
5
|
Home-page: https://github.com/mawinkler/pyastroweatherio
|
|
6
6
|
Author: Markus Winkler
|
|
7
7
|
Author-email: winkler.info@icloud.com
|
|
8
8
|
License: MIT
|
|
9
|
-
Keywords: AstroWeather,
|
|
9
|
+
Keywords: AstroWeather,Met.no,OpenMeteo,Python
|
|
10
10
|
Classifier: Development Status :: 4 - Beta
|
|
11
11
|
Classifier: Intended Audience :: Developers
|
|
12
12
|
Classifier: Topic :: Software Development :: Build Tools
|
|
@@ -28,7 +28,7 @@ Requires-Dist: pytz>=2024.2
|
|
|
28
28
|
Requires-Dist: setuptools>=75.1
|
|
29
29
|
Requires-Dist: typeguard>=4.3
|
|
30
30
|
Requires-Dist: openmeteo-requests~=1.3
|
|
31
|
-
Requires-Dist: pandas
|
|
31
|
+
Requires-Dist: pandas~=2.2
|
|
32
32
|
Requires-Dist: tabulate~=0.9
|
|
33
33
|
Dynamic: author
|
|
34
34
|
Dynamic: author-email
|
|
@@ -41,4 +41,4 @@ Dynamic: license-file
|
|
|
41
41
|
Dynamic: requires-dist
|
|
42
42
|
Dynamic: summary
|
|
43
43
|
|
|
44
|
-
Lightweight Python 3 module to receive data via REST API from
|
|
44
|
+
Lightweight Python 3 module to receive data via REST API from OpenMeteo and Met.no and consume UpTonight reports.
|
|
@@ -11,20 +11,20 @@ if os.path.isfile(requirement_path):
|
|
|
11
11
|
setup(
|
|
12
12
|
name="pyastroweatherio",
|
|
13
13
|
packages=["pyastroweatherio"],
|
|
14
|
-
version="0.
|
|
14
|
+
version="0.73.0.dev1",
|
|
15
15
|
license="MIT",
|
|
16
|
-
description="Python Wrapper for
|
|
16
|
+
description="Python Wrapper for OpenMeteo and Met.no REST API",
|
|
17
17
|
long_description=" ".join(
|
|
18
18
|
[
|
|
19
19
|
"Lightweight Python 3 module to receive data via",
|
|
20
|
-
"REST API from
|
|
20
|
+
"REST API from OpenMeteo and Met.no and consume",
|
|
21
21
|
"UpTonight reports.",
|
|
22
22
|
],
|
|
23
23
|
),
|
|
24
24
|
author="Markus Winkler",
|
|
25
25
|
author_email="winkler.info@icloud.com",
|
|
26
26
|
url="https://github.com/mawinkler/pyastroweatherio",
|
|
27
|
-
keywords=["AstroWeather", "
|
|
27
|
+
keywords=["AstroWeather", "Met.no", "OpenMeteo", "Python"],
|
|
28
28
|
install_requires=install_requires,
|
|
29
29
|
classifiers=[
|
|
30
30
|
# Chose either "3 - Alpha", "4 - Beta" or "5 - Production/Stable" as the current state of your package
|
|
File without changes
|
|
File without changes
|
{pyastroweatherio-0.72.0.dev1 → pyastroweatherio-0.73.0.dev1}/pyastroweatherio.egg-info/SOURCES.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|