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.
Files changed (22) hide show
  1. {juham_visualcrossing-0.0.4/juham_visualcrossing.egg-info → juham_visualcrossing-0.1.2}/PKG-INFO +4 -4
  2. juham_visualcrossing-0.1.2/README.rst +34 -0
  3. {juham_visualcrossing-0.0.4 → juham_visualcrossing-0.1.2}/juham_visualcrossing/visualcrossing.py +5 -7
  4. {juham_visualcrossing-0.0.4 → juham_visualcrossing-0.1.2/juham_visualcrossing.egg-info}/PKG-INFO +4 -4
  5. {juham_visualcrossing-0.0.4 → juham_visualcrossing-0.1.2}/juham_visualcrossing.egg-info/SOURCES.txt +1 -0
  6. {juham_visualcrossing-0.0.4 → juham_visualcrossing-0.1.2}/juham_visualcrossing.egg-info/requires.txt +1 -1
  7. {juham_visualcrossing-0.0.4 → juham_visualcrossing-0.1.2}/pyproject.toml +4 -4
  8. {juham_visualcrossing-0.0.4 → juham_visualcrossing-0.1.2}/MANIFEST.in +0 -0
  9. {juham_visualcrossing-0.0.4 → juham_visualcrossing-0.1.2}/docs/source/CHANGELOG.rst +0 -0
  10. {juham_visualcrossing-0.0.4 → juham_visualcrossing-0.1.2}/docs/source/CONTRIBUTING.rst +0 -0
  11. {juham_visualcrossing-0.0.4 → juham_visualcrossing-0.1.2}/docs/source/LICENSE.rst +0 -0
  12. {juham_visualcrossing-0.0.4 → juham_visualcrossing-0.1.2}/docs/source/README.rst +0 -0
  13. {juham_visualcrossing-0.0.4 → juham_visualcrossing-0.1.2}/juham_visualcrossing/__init__.py +0 -0
  14. {juham_visualcrossing-0.0.4 → juham_visualcrossing-0.1.2}/juham_visualcrossing/py.typed +0 -0
  15. {juham_visualcrossing-0.0.4 → juham_visualcrossing-0.1.2}/juham_visualcrossing.egg-info/dependency_links.txt +0 -0
  16. {juham_visualcrossing-0.0.4 → juham_visualcrossing-0.1.2}/juham_visualcrossing.egg-info/entry_points.txt +0 -0
  17. {juham_visualcrossing-0.0.4 → juham_visualcrossing-0.1.2}/juham_visualcrossing.egg-info/top_level.txt +0 -0
  18. {juham_visualcrossing-0.0.4 → juham_visualcrossing-0.1.2}/setup.cfg +0 -0
  19. {juham_visualcrossing-0.0.4 → juham_visualcrossing-0.1.2}/tests/__init__.py +0 -0
  20. {juham_visualcrossing-0.0.4 → juham_visualcrossing-0.1.2}/tests/__pycache__/__init__.cpython-312.pyc +0 -0
  21. {juham_visualcrossing-0.0.4 → juham_visualcrossing-0.1.2}/tests/__pycache__/test_visualcrossing.cpython-312.pyc +0 -0
  22. {juham_visualcrossing-0.0.4 → juham_visualcrossing-0.1.2}/tests/test_visualcrossing.py +0 -0
@@ -1,7 +1,7 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: juham_visualcrossing
3
- Version: 0.0.4
4
- Summary: A Weather forecast plugin extending `juham` applications
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 :: 1 - Planning
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.0.16
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
+
@@ -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 # for python 3.9 compatibility
5
-
4
+ from typing_extensions import override
6
5
  from masterpiece.mqtt import MqttMsg, Mqtt
7
- from juham.base import Base
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, Base.instantiate(VisualCrossing.workerThreadId)
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.0.4
4
- Summary: A Weather forecast plugin extending `juham` applications
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 :: 1 - Planning
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.0.16
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
@@ -1,4 +1,5 @@
1
1
  MANIFEST.in
2
+ README.rst
2
3
  pyproject.toml
3
4
  docs/source/LICENSE.rst
4
5
  docs/source/README.rst
@@ -1,4 +1,4 @@
1
- juham>=0.0.16
1
+ juham>=0.1.3
2
2
  pytz>=2024.1
3
3
  importlib-metadata
4
4
 
@@ -6,8 +6,8 @@ build-backend = "setuptools.build_meta"
6
6
 
7
7
  [project]
8
8
  name = "juham_visualcrossing"
9
- version = "0.0.4"
10
- description = "A Weather forecast plugin extending `juham` applications"
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 :: 1 - Planning",
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.0.16",
31
+ "juham >= 0.1.3",
32
32
  "pytz >= 2024.1",
33
33
  "importlib-metadata"
34
34
  ]