juham-visualcrossing 0.0.4__py3-none-any.whl → 0.1.2__py3-none-any.whl
Sign up to get free protection for your applications and to get access to all the features.
- juham_visualcrossing/visualcrossing.py +5 -7
- {juham_visualcrossing-0.0.4.dist-info → juham_visualcrossing-0.1.2.dist-info}/METADATA +4 -4
- juham_visualcrossing-0.1.2.dist-info/RECORD +8 -0
- juham_visualcrossing-0.0.4.dist-info/RECORD +0 -8
- {juham_visualcrossing-0.0.4.dist-info → juham_visualcrossing-0.1.2.dist-info}/WHEEL +0 -0
- {juham_visualcrossing-0.0.4.dist-info → juham_visualcrossing-0.1.2.dist-info}/entry_points.txt +0 -0
- {juham_visualcrossing-0.0.4.dist-info → juham_visualcrossing-0.1.2.dist-info}/top_level.txt +0 -0
@@ -1,11 +1,9 @@
|
|
1
1
|
from datetime import datetime, timedelta, timezone
|
2
2
|
import json
|
3
3
|
from typing import Any, Optional, cast
|
4
|
-
from typing_extensions import override
|
5
|
-
|
4
|
+
from typing_extensions import override
|
6
5
|
from masterpiece.mqtt import MqttMsg, Mqtt
|
7
|
-
from juham.
|
8
|
-
from juham.web import RCloud, RCloudThread
|
6
|
+
from juham.core import RCloud, RCloudThread
|
9
7
|
|
10
8
|
|
11
9
|
class VisualCrossingThread(RCloudThread):
|
@@ -45,7 +43,7 @@ class VisualCrossingThread(RCloudThread):
|
|
45
43
|
start = now.strftime("%Y-%m-%d")
|
46
44
|
stop = end.strftime("%Y-%m-%d")
|
47
45
|
url = f"{self._base_url}{self._location}/{start}/{stop}?unitGroup=metric&contentType=json&include=hours&key={self._api_key}"
|
48
|
-
self.debug(url)
|
46
|
+
# self.debug(url)
|
49
47
|
return url
|
50
48
|
|
51
49
|
def init(
|
@@ -156,14 +154,14 @@ class VisualCrossing(RCloud):
|
|
156
154
|
Args:
|
157
155
|
em (dict): forecast
|
158
156
|
"""
|
159
|
-
self.debug(f"VisualCrossing: got mqtt message {em}")
|
157
|
+
# self.debug(f"VisualCrossing: got mqtt message {em}")
|
160
158
|
|
161
159
|
@override
|
162
160
|
def run(self) -> None:
|
163
161
|
# create, initialize and start the asynchronous thread for acquiring forecast
|
164
162
|
|
165
163
|
self.worker = cast(
|
166
|
-
VisualCrossingThread,
|
164
|
+
VisualCrossingThread, self.instantiate(VisualCrossing.workerThreadId)
|
167
165
|
)
|
168
166
|
self.worker.init(
|
169
167
|
self.forecast_topic,
|
@@ -1,7 +1,7 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: juham_visualcrossing
|
3
|
-
Version: 0.
|
4
|
-
Summary: A Weather forecast plugin extending `
|
3
|
+
Version: 0.1.2
|
4
|
+
Summary: A Weather forecast plugin extending `Juham` applications
|
5
5
|
Author-email: J Meskanen <juham.api@gmail.com>
|
6
6
|
Maintainer-email: "J. Meskanen" <juham.api@gmail.com>
|
7
7
|
License: MIT License
|
@@ -33,14 +33,14 @@ Project-URL: Funding, https://meskanen.com
|
|
33
33
|
Project-URL: Say Thanks!, http://meskanen.com
|
34
34
|
Project-URL: Source, https://meskanen.com
|
35
35
|
Keywords: object-oriented,plugin,framework
|
36
|
-
Classifier: Development Status ::
|
36
|
+
Classifier: Development Status :: 2 - Pre-Alpha
|
37
37
|
Classifier: Intended Audience :: Developers
|
38
38
|
Classifier: Topic :: Software Development
|
39
39
|
Classifier: License :: OSI Approved :: MIT License
|
40
40
|
Classifier: Programming Language :: Python :: 3.8
|
41
41
|
Requires-Python: >=3.8
|
42
42
|
Description-Content-Type: text/markdown
|
43
|
-
Requires-Dist: juham>=0.
|
43
|
+
Requires-Dist: juham>=0.1.3
|
44
44
|
Requires-Dist: pytz>=2024.1
|
45
45
|
Requires-Dist: importlib-metadata
|
46
46
|
Provides-Extra: dev
|
@@ -0,0 +1,8 @@
|
|
1
|
+
juham_visualcrossing/__init__.py,sha256=qsVRSTeJW8jgBtLviUjq5JiJ8Z6eYkBQn6zMWgS0okY,161
|
2
|
+
juham_visualcrossing/py.typed,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrKVGs,1
|
3
|
+
juham_visualcrossing/visualcrossing.py,sha256=oACCvgx_DBH1e7CideOxaDdqik4h98vo57PyhIJ7xPA,7194
|
4
|
+
juham_visualcrossing-0.1.2.dist-info/METADATA,sha256=yEpWNEi_gZnWx0xKnQI28v6GYnulq4XXnl-YICZmh2c,3152
|
5
|
+
juham_visualcrossing-0.1.2.dist-info/WHEEL,sha256=PZUExdf71Ui_so67QXpySuHtCi3-J3wvF4ORK6k_S8U,91
|
6
|
+
juham_visualcrossing-0.1.2.dist-info/entry_points.txt,sha256=A-NSi2RN5KSKwpbKG592v5qnWnGHmIjPktubd5PQ80M,76
|
7
|
+
juham_visualcrossing-0.1.2.dist-info/top_level.txt,sha256=7yWaUHZo-Ng96VJBzUFhaFCBamL71PUjIxZISxMBjSM,21
|
8
|
+
juham_visualcrossing-0.1.2.dist-info/RECORD,,
|
@@ -1,8 +0,0 @@
|
|
1
|
-
juham_visualcrossing/__init__.py,sha256=qsVRSTeJW8jgBtLviUjq5JiJ8Z6eYkBQn6zMWgS0okY,161
|
2
|
-
juham_visualcrossing/py.typed,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrKVGs,1
|
3
|
-
juham_visualcrossing/visualcrossing.py,sha256=gdrlzXhIl52rqPSwwmZv1hS8LxGsY-TcnOjFND7xuSw,7252
|
4
|
-
juham_visualcrossing-0.0.4.dist-info/METADATA,sha256=K6IZFpYhq6Zg-zibQCw7iab3ixzL0OoUpE3oLPlqF64,3152
|
5
|
-
juham_visualcrossing-0.0.4.dist-info/WHEEL,sha256=PZUExdf71Ui_so67QXpySuHtCi3-J3wvF4ORK6k_S8U,91
|
6
|
-
juham_visualcrossing-0.0.4.dist-info/entry_points.txt,sha256=A-NSi2RN5KSKwpbKG592v5qnWnGHmIjPktubd5PQ80M,76
|
7
|
-
juham_visualcrossing-0.0.4.dist-info/top_level.txt,sha256=7yWaUHZo-Ng96VJBzUFhaFCBamL71PUjIxZISxMBjSM,21
|
8
|
-
juham_visualcrossing-0.0.4.dist-info/RECORD,,
|
File without changes
|
{juham_visualcrossing-0.0.4.dist-info → juham_visualcrossing-0.1.2.dist-info}/entry_points.txt
RENAMED
File without changes
|
File without changes
|