juham-visualcrossing 0.0.4__tar.gz → 0.1.2__tar.gz
Sign up to get free protection for your applications and to get access to all the features.
- {juham_visualcrossing-0.0.4/juham_visualcrossing.egg-info → juham_visualcrossing-0.1.2}/PKG-INFO +4 -4
- juham_visualcrossing-0.1.2/README.rst +34 -0
- {juham_visualcrossing-0.0.4 → juham_visualcrossing-0.1.2}/juham_visualcrossing/visualcrossing.py +5 -7
- {juham_visualcrossing-0.0.4 → juham_visualcrossing-0.1.2/juham_visualcrossing.egg-info}/PKG-INFO +4 -4
- {juham_visualcrossing-0.0.4 → juham_visualcrossing-0.1.2}/juham_visualcrossing.egg-info/SOURCES.txt +1 -0
- {juham_visualcrossing-0.0.4 → juham_visualcrossing-0.1.2}/juham_visualcrossing.egg-info/requires.txt +1 -1
- {juham_visualcrossing-0.0.4 → juham_visualcrossing-0.1.2}/pyproject.toml +4 -4
- {juham_visualcrossing-0.0.4 → juham_visualcrossing-0.1.2}/MANIFEST.in +0 -0
- {juham_visualcrossing-0.0.4 → juham_visualcrossing-0.1.2}/docs/source/CHANGELOG.rst +0 -0
- {juham_visualcrossing-0.0.4 → juham_visualcrossing-0.1.2}/docs/source/CONTRIBUTING.rst +0 -0
- {juham_visualcrossing-0.0.4 → juham_visualcrossing-0.1.2}/docs/source/LICENSE.rst +0 -0
- {juham_visualcrossing-0.0.4 → juham_visualcrossing-0.1.2}/docs/source/README.rst +0 -0
- {juham_visualcrossing-0.0.4 → juham_visualcrossing-0.1.2}/juham_visualcrossing/__init__.py +0 -0
- {juham_visualcrossing-0.0.4 → juham_visualcrossing-0.1.2}/juham_visualcrossing/py.typed +0 -0
- {juham_visualcrossing-0.0.4 → juham_visualcrossing-0.1.2}/juham_visualcrossing.egg-info/dependency_links.txt +0 -0
- {juham_visualcrossing-0.0.4 → juham_visualcrossing-0.1.2}/juham_visualcrossing.egg-info/entry_points.txt +0 -0
- {juham_visualcrossing-0.0.4 → juham_visualcrossing-0.1.2}/juham_visualcrossing.egg-info/top_level.txt +0 -0
- {juham_visualcrossing-0.0.4 → juham_visualcrossing-0.1.2}/setup.cfg +0 -0
- {juham_visualcrossing-0.0.4 → juham_visualcrossing-0.1.2}/tests/__init__.py +0 -0
- {juham_visualcrossing-0.0.4 → juham_visualcrossing-0.1.2}/tests/__pycache__/__init__.cpython-312.pyc +0 -0
- {juham_visualcrossing-0.0.4 → juham_visualcrossing-0.1.2}/tests/__pycache__/test_visualcrossing.cpython-312.pyc +0 -0
- {juham_visualcrossing-0.0.4 → juham_visualcrossing-0.1.2}/tests/test_visualcrossing.py +0 -0
{juham_visualcrossing-0.0.4/juham_visualcrossing.egg-info → juham_visualcrossing-0.1.2}/PKG-INFO
RENAMED
@@ -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,34 @@
|
|
1
|
+
VisualCrossing forecast plugin for Juham™
|
2
|
+
=========================================
|
3
|
+
|
4
|
+
Description
|
5
|
+
-----------
|
6
|
+
|
7
|
+
Adds forecast support to Juham™ home automation.
|
8
|
+
|
9
|
+
|
10
|
+
Project Status
|
11
|
+
--------------
|
12
|
+
|
13
|
+
**Current State**: **Pre-Alpha (Status 2)**
|
14
|
+
|
15
|
+
Please check out the `CHANGELOG <CHANGELOG.rst>`_ file for changes in this release.
|
16
|
+
|
17
|
+
|
18
|
+
|
19
|
+
Getting Started
|
20
|
+
---------------
|
21
|
+
|
22
|
+
### Installation
|
23
|
+
|
24
|
+
1. Install
|
25
|
+
|
26
|
+
.. code-block:: bash
|
27
|
+
|
28
|
+
pip install juham_visualcrossing
|
29
|
+
|
30
|
+
|
31
|
+
2. Configure
|
32
|
+
|
33
|
+
- ``VisualCrossing.json``: Add your Visual Crossing API key for weather forecasts.
|
34
|
+
|
{juham_visualcrossing-0.0.4 → juham_visualcrossing-0.1.2}/juham_visualcrossing/visualcrossing.py
RENAMED
@@ -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,
|
{juham_visualcrossing-0.0.4 → juham_visualcrossing-0.1.2/juham_visualcrossing.egg-info}/PKG-INFO
RENAMED
@@ -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
|
@@ -6,8 +6,8 @@ build-backend = "setuptools.build_meta"
|
|
6
6
|
|
7
7
|
[project]
|
8
8
|
name = "juham_visualcrossing"
|
9
|
-
version = "0.
|
10
|
-
description = "A Weather forecast plugin extending `
|
9
|
+
version = "0.1.2"
|
10
|
+
description = "A Weather forecast plugin extending `Juham` applications"
|
11
11
|
readme = {file = "docs/source/README.rst", content-type = "text/markdown"}
|
12
12
|
requires-python = ">=3.8"
|
13
13
|
license = {file = "docs/source/LICENSE.rst", content-type = "text/markdown"}
|
@@ -20,7 +20,7 @@ maintainers = [
|
|
20
20
|
]
|
21
21
|
|
22
22
|
classifiers = [
|
23
|
-
"Development Status ::
|
23
|
+
"Development Status :: 2 - Pre-Alpha",
|
24
24
|
"Intended Audience :: Developers",
|
25
25
|
"Topic :: Software Development",
|
26
26
|
"License :: OSI Approved :: MIT License",
|
@@ -28,7 +28,7 @@ classifiers = [
|
|
28
28
|
]
|
29
29
|
|
30
30
|
dependencies = [
|
31
|
-
"juham >= 0.
|
31
|
+
"juham >= 0.1.3",
|
32
32
|
"pytz >= 2024.1",
|
33
33
|
"importlib-metadata"
|
34
34
|
]
|
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
|
{juham_visualcrossing-0.0.4 → juham_visualcrossing-0.1.2}/tests/__pycache__/__init__.cpython-312.pyc
RENAMED
File without changes
|
File without changes
|
File without changes
|