juham-visualcrossing 0.1.2__tar.gz → 0.1.8__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.
Files changed (25) hide show
  1. {juham_visualcrossing-0.1.2/docs/source → juham_visualcrossing-0.1.8}/LICENSE.rst +22 -22
  2. {juham_visualcrossing-0.1.2 → juham_visualcrossing-0.1.8}/MANIFEST.in +11 -11
  3. {juham_visualcrossing-0.1.2 → juham_visualcrossing-0.1.8}/PKG-INFO +87 -88
  4. {juham_visualcrossing-0.1.2 → juham_visualcrossing-0.1.8}/README.rst +39 -34
  5. juham_visualcrossing-0.1.8/juham_visualcrossing/__init__.py +16 -0
  6. {juham_visualcrossing-0.1.2 → juham_visualcrossing-0.1.8}/juham_visualcrossing/visualcrossing.py +194 -194
  7. juham_visualcrossing-0.1.8/juham_visualcrossing/visualcrossing_plugin.py +18 -0
  8. {juham_visualcrossing-0.1.2 → juham_visualcrossing-0.1.8}/juham_visualcrossing.egg-info/PKG-INFO +87 -88
  9. {juham_visualcrossing-0.1.2 → juham_visualcrossing-0.1.8}/juham_visualcrossing.egg-info/SOURCES.txt +3 -9
  10. juham_visualcrossing-0.1.8/juham_visualcrossing.egg-info/entry_points.txt +2 -0
  11. {juham_visualcrossing-0.1.2 → juham_visualcrossing-0.1.8}/juham_visualcrossing.egg-info/requires.txt +1 -2
  12. {juham_visualcrossing-0.1.2 → juham_visualcrossing-0.1.8}/pyproject.toml +58 -57
  13. {juham_visualcrossing-0.1.2 → juham_visualcrossing-0.1.8}/setup.cfg +4 -4
  14. {juham_visualcrossing-0.1.2 → juham_visualcrossing-0.1.8}/tests/test_visualcrossing.py +16 -16
  15. juham_visualcrossing-0.1.2/docs/source/CHANGELOG.rst +0 -8
  16. juham_visualcrossing-0.1.2/docs/source/CONTRIBUTING.rst +0 -56
  17. juham_visualcrossing-0.1.2/docs/source/README.rst +0 -40
  18. juham_visualcrossing-0.1.2/juham_visualcrossing/__init__.py +0 -13
  19. juham_visualcrossing-0.1.2/juham_visualcrossing.egg-info/entry_points.txt +0 -2
  20. juham_visualcrossing-0.1.2/tests/__pycache__/__init__.cpython-312.pyc +0 -0
  21. juham_visualcrossing-0.1.2/tests/__pycache__/test_visualcrossing.cpython-312.pyc +0 -0
  22. {juham_visualcrossing-0.1.2 → juham_visualcrossing-0.1.8}/juham_visualcrossing/py.typed +0 -0
  23. {juham_visualcrossing-0.1.2 → juham_visualcrossing-0.1.8}/juham_visualcrossing.egg-info/dependency_links.txt +0 -0
  24. {juham_visualcrossing-0.1.2 → juham_visualcrossing-0.1.8}/juham_visualcrossing.egg-info/top_level.txt +0 -0
  25. {juham_visualcrossing-0.1.2 → juham_visualcrossing-0.1.8}/tests/__init__.py +0 -0
@@ -1,22 +1,22 @@
1
- MIT License
2
- ===========
3
-
4
- Copyright (c) 2024, Juha Meskanen
5
-
6
- Permission is hereby granted, free of charge, to any person obtaining a copy
7
- of this software and associated documentation files (the "Software"), to deal
8
- in the Software without restriction, including without limitation the rights
9
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10
- copies of the Software, and to permit persons to whom the Software is
11
- furnished to do so, subject to the following conditions:
12
-
13
- The above copyright notice and this permission notice shall be included in all
14
- copies or substantial portions of the Software.
15
-
16
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22
-
1
+ MIT License
2
+ ===========
3
+
4
+ Copyright (c) 2024, Juha Meskanen
5
+
6
+ Permission is hereby granted, free of charge, to any person obtaining a copy
7
+ of this software and associated documentation files (the "Software"), to deal
8
+ in the Software without restriction, including without limitation the rights
9
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10
+ copies of the Software, and to permit persons to whom the Software is
11
+ furnished to do so, subject to the following conditions:
12
+
13
+ The above copyright notice and this permission notice shall be included in all
14
+ copies or substantial portions of the Software.
15
+
16
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22
+
@@ -1,11 +1,11 @@
1
- include docs/source/README.rst
2
- include docs/source/CHANGELOG.rst
3
- include docs/source/LICENSE.rst
4
- include docs/source/CONTRIBUTING.rst
5
-
6
- recursive-include tests *
7
- recursive-include docs/build/html *
8
-
9
- # files to be excluded
10
- global-exclude *~ \#*
11
-
1
+ include docs/source/README.rst
2
+ include docs/source/CHANGELOG.rst
3
+ include docs/source/LICENSE.rst
4
+ include docs/source/CONTRIBUTING.rst
5
+
6
+ recursive-include tests *
7
+ recursive-include docs/build/html *
8
+
9
+ # files to be excluded
10
+ global-exclude *~ \#*
11
+
@@ -1,88 +1,87 @@
1
- Metadata-Version: 2.1
2
- Name: juham_visualcrossing
3
- Version: 0.1.2
4
- Summary: A Weather forecast plugin extending `Juham` applications
5
- Author-email: J Meskanen <juham.api@gmail.com>
6
- Maintainer-email: "J. Meskanen" <juham.api@gmail.com>
7
- License: MIT License
8
- ===========
9
-
10
- Copyright (c) 2024, Juha Meskanen
11
-
12
- Permission is hereby granted, free of charge, to any person obtaining a copy
13
- of this software and associated documentation files (the "Software"), to deal
14
- in the Software without restriction, including without limitation the rights
15
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
16
- copies of the Software, and to permit persons to whom the Software is
17
- furnished to do so, subject to the following conditions:
18
-
19
- The above copyright notice and this permission notice shall be included in all
20
- copies or substantial portions of the Software.
21
-
22
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
23
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
24
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
25
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
26
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
27
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
28
-
29
-
30
- Project-URL: Homepage, https://meskanen.com
31
- Project-URL: Bug Reports, https://meskanen.com
32
- Project-URL: Funding, https://meskanen.com
33
- Project-URL: Say Thanks!, http://meskanen.com
34
- Project-URL: Source, https://meskanen.com
35
- Keywords: object-oriented,plugin,framework
36
- Classifier: Development Status :: 2 - Pre-Alpha
37
- Classifier: Intended Audience :: Developers
38
- Classifier: Topic :: Software Development
39
- Classifier: License :: OSI Approved :: MIT License
40
- Classifier: Programming Language :: Python :: 3.8
41
- Requires-Python: >=3.8
42
- Description-Content-Type: text/markdown
43
- Requires-Dist: juham>=0.1.3
44
- Requires-Dist: pytz>=2024.1
45
- Requires-Dist: importlib-metadata
46
- Provides-Extra: dev
47
- Requires-Dist: check-manifest; extra == "dev"
48
-
49
- juham_visualcrossing
50
- ====================
51
-
52
- `juham_visualcrossing` plugs VisualCrossing weather forecast service to Juham - Juha's Ultimate
53
- Home Automation Masterpiece application.
54
-
55
-
56
-
57
- Features
58
- --------
59
-
60
- The main purpose is to acquire solar energy forecast, for optimizing energy management in
61
- homes with solar panels.
62
-
63
-
64
- Installation
65
- ------------
66
-
67
- The installation is two stage process
68
-
69
- 1. To install:
70
-
71
- .. code-block:: python
72
-
73
- pip install juham_visualcrossing
74
-
75
-
76
- 2. Configure
77
-
78
- VisualCrossing requires you to register and obtain web key, through which you can
79
- access their forecast services. So sign in to visualcrossing.com to obtain the key,
80
- and then add the web key to the '~/.[app]/config/VisualCrossing.json' configuration
81
- file.
82
-
83
-
84
-
85
- License
86
- -------
87
-
88
- This project is licensed under the MIT License - see the `LICENSE` file for details.
1
+ Metadata-Version: 2.2
2
+ Name: juham-visualcrossing
3
+ Version: 0.1.8
4
+ Summary: A Weather forecast plugin extending `Juham` applications
5
+ Author-email: J Meskanen <juham.api@gmail.com>
6
+ Maintainer-email: "J. Meskanen" <juham.api@gmail.com>
7
+ License: MIT License
8
+ ===========
9
+
10
+ Copyright (c) 2024, Juha Meskanen
11
+
12
+ Permission is hereby granted, free of charge, to any person obtaining a copy
13
+ of this software and associated documentation files (the "Software"), to deal
14
+ in the Software without restriction, including without limitation the rights
15
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
16
+ copies of the Software, and to permit persons to whom the Software is
17
+ furnished to do so, subject to the following conditions:
18
+
19
+ The above copyright notice and this permission notice shall be included in all
20
+ copies or substantial portions of the Software.
21
+
22
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
23
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
24
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
25
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
26
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
27
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
28
+
29
+
30
+ Project-URL: Homepage, https://gitlab.com/juham/juham/juham-visualcrossing
31
+ Project-URL: Bug Reports, https://gitlab.com/juham/juham/juham-visualcrossing
32
+ Project-URL: Funding, https://meskanen.com
33
+ Project-URL: Say Thanks!, http://meskanen.com
34
+ Project-URL: Source, https://gitlab.com/juham/juham/juham-visualcrossing
35
+ Keywords: object-oriented,plugin,framework
36
+ Classifier: Development Status :: 3 - Alpha
37
+ Classifier: Intended Audience :: Developers
38
+ Classifier: Topic :: Software Development
39
+ Classifier: License :: OSI Approved :: MIT License
40
+ Classifier: Programming Language :: Python :: 3.8
41
+ Requires-Python: >=3.8
42
+ Description-Content-Type: text/x-rst
43
+ License-File: LICENSE.rst
44
+ Requires-Dist: juham-core>=0.1.1
45
+ Requires-Dist: pytz>=2024.1
46
+ Provides-Extra: dev
47
+ Requires-Dist: check-manifest; extra == "dev"
48
+
49
+ VisualCrossing forecast plugin for Juham™
50
+ =========================================
51
+
52
+ Description
53
+ -----------
54
+
55
+ Adds forecast support to Juham™ home automation.
56
+
57
+ .. image:: _static/images/visualcrossing.png
58
+ :alt: Solar and temperature forecasts
59
+ :width: 640px
60
+ :align: center
61
+
62
+
63
+ Project Status
64
+ --------------
65
+
66
+ **Current State**: **Alpha (Status 3)**
67
+
68
+ Please check out the `CHANGELOG <CHANGELOG.rst>`_ file for changes in this release.
69
+
70
+
71
+
72
+ Getting Started
73
+ ---------------
74
+
75
+ ### Installation
76
+
77
+ 1. Install
78
+
79
+ .. code-block:: bash
80
+
81
+ pip install juham_visualcrossing
82
+
83
+
84
+ 2. Configure
85
+
86
+ - ``VisualCrossing.json``: Add your Visual Crossing API key for weather forecasts.
87
+
@@ -1,34 +1,39 @@
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
+ VisualCrossing forecast plugin for Juham™
2
+ =========================================
3
+
4
+ Description
5
+ -----------
6
+
7
+ Adds forecast support to Juham™ home automation.
8
+
9
+ .. image:: _static/images/visualcrossing.png
10
+ :alt: Solar and temperature forecasts
11
+ :width: 640px
12
+ :align: center
13
+
14
+
15
+ Project Status
16
+ --------------
17
+
18
+ **Current State**: **Alpha (Status 3)**
19
+
20
+ Please check out the `CHANGELOG <CHANGELOG.rst>`_ file for changes in this release.
21
+
22
+
23
+
24
+ Getting Started
25
+ ---------------
26
+
27
+ ### Installation
28
+
29
+ 1. Install
30
+
31
+ .. code-block:: bash
32
+
33
+ pip install juham_visualcrossing
34
+
35
+
36
+ 2. Configure
37
+
38
+ - ``VisualCrossing.json``: Add your Visual Crossing API key for weather forecasts.
39
+
@@ -0,0 +1,16 @@
1
+ """
2
+ Description
3
+ ===========
4
+
5
+ VisualCrossing weather forecast.
6
+
7
+ """
8
+
9
+ from .visualcrossing import VisualCrossing, VisualCrossingThread
10
+ from .visualcrossing_plugin import VisualCrossingPlugin
11
+
12
+ __all__ = [
13
+ "VisualCrossing",
14
+ "VisualCrossingThread",
15
+ "VisualCrossingPlugin",
16
+ ]
@@ -1,194 +1,194 @@
1
- from datetime import datetime, timedelta, timezone
2
- import json
3
- from typing import Any, Optional, cast
4
- from typing_extensions import override
5
- from masterpiece.mqtt import MqttMsg, Mqtt
6
- from juham.core import RCloud, RCloudThread
7
-
8
-
9
- class VisualCrossingThread(RCloudThread):
10
- """Asynchronous thread for acquiring forecast from the VisualCrossing
11
- site."""
12
-
13
- # class attributes
14
- _forecast_topic: str = ""
15
- _base_url: str = ""
16
- _api_key: str = ""
17
- _location: str = ""
18
- _interval: float = 12 * 3600
19
-
20
- def __init__(self, client: Optional[Mqtt] = None):
21
- """Construct with the given mqtt client. Acquires data from the visual
22
- crossing web service and publishes the forecast data to
23
- forecast_topic.
24
-
25
- Args:
26
- client (object, optional): MQTT client. Defaults to None.
27
- """
28
- super().__init__(client)
29
- self.mqtt_client: Optional[Mqtt] = client
30
-
31
- @override
32
- def update_interval(self) -> float:
33
- return self._interval
34
-
35
- @override
36
- def make_weburl(self) -> str:
37
- if not self._api_key:
38
- self.error("Uninitialized api_key {self.get_class_id()}: {self._api_key}")
39
- return ""
40
- else:
41
- now = datetime.now()
42
- end = now + timedelta(days=1)
43
- start = now.strftime("%Y-%m-%d")
44
- stop = end.strftime("%Y-%m-%d")
45
- url = f"{self._base_url}{self._location}/{start}/{stop}?unitGroup=metric&contentType=json&include=hours&key={self._api_key}"
46
- # self.debug(url)
47
- return url
48
-
49
- def init(
50
- self, topic: str, base_url: str, interval: float, api_key: str, location: str
51
- ) -> None:
52
- """Initialize the data acquisition thread
53
-
54
- Args:
55
- topic (str): mqtt topic to publish the acquired data
56
- base_url (str): url of the web service
57
- interval (float): update interval in seconds
58
- api_key (str): api_key, as required by the web service
59
- location (str): geographic location
60
- """
61
- self._forecast_topic = topic
62
- self._base_url = base_url
63
- self._interval = interval
64
- self._api_key = api_key
65
- self._location = location
66
-
67
- @override
68
- def process_data(self, data: Any) -> None:
69
- self.info("VisualCrossing process_data()")
70
- data = data.json()
71
- forecast = []
72
- self.info(f"VisualCrossing {data}")
73
- for day in data["days"]:
74
- for hour in day["hours"]:
75
- ts = int(hour["datetimeEpoch"])
76
- forecast.append(
77
- {
78
- "id": "visualcrossing",
79
- "ts": ts,
80
- "hour": datetime.fromtimestamp(ts, tz=timezone.utc).strftime(
81
- "%H"
82
- ),
83
- "day": datetime.fromtimestamp(ts, tz=timezone.utc).strftime(
84
- "%Y%m%d%H"
85
- ),
86
- "uvindex": hour["uvindex"],
87
- "solarradiation": hour["solarradiation"],
88
- "solarenergy": hour["solarenergy"],
89
- "cloudcover": hour["cloudcover"],
90
- "snow": hour["snow"],
91
- "snowdepth": hour["snowdepth"],
92
- "pressure": hour["pressure"],
93
- "temp": hour["temp"],
94
- "humidity": hour["humidity"],
95
- "windspeed": hour["windspeed"],
96
- "winddir": hour["winddir"],
97
- "dew": hour["dew"],
98
- }
99
- )
100
- msg = json.dumps(forecast)
101
- self.publish(self._forecast_topic, msg, qos=1, retain=False)
102
- self.info(f"VisualCrossing forecast published to {self._forecast_topic}")
103
-
104
-
105
- class VisualCrossing(RCloud):
106
- """Constructs a data acquisition object for reading weather
107
- forecasts from the VisualCrossing web service. Subscribes to the
108
- forecast topic and writes hourly data such as solar energy, temperature,
109
- and other attributes relevant to home automation into a time series
110
- database.
111
-
112
- Spawns an asynchronous thread to run queries at the specified
113
- update_interval.
114
- """
115
-
116
- workerThreadId: str = VisualCrossingThread.get_class_id()
117
- base_url: str = (
118
- "https://weather.visualcrossing.com/VisualCrossingWebServices/rest/services/timeline/"
119
- )
120
- update_interval: float = 12 * 3600
121
- api_key: str = "SE9W7EHP775N7NDNW8ANM2MZN"
122
- location: str = "lahti,finland"
123
-
124
- def __init__(self, name="visualcrossing") -> None:
125
- """Constructs VisualCrossing automation object for acquiring and publishing
126
- forecast data.
127
-
128
- Args:
129
- name (str, optional): name of the object. Defaults to "visualcrossing".
130
- """
131
- super().__init__(name)
132
- self.worker: Optional[VisualCrossingThread] = None
133
- self.forecast_topic: str = self.make_topic_name("forecast")
134
- self.debug(f"VisualCrossing with name {name} created")
135
-
136
- @override
137
- def on_connect(self, client: object, userdata: Any, flags: int, rc: int) -> None:
138
- super().on_connect(client, userdata, flags, rc)
139
- if rc == 0:
140
- self.subscribe(self.forecast_topic)
141
- self.debug(f"VisualCrossing subscribed to topic {self.forecast_topic}")
142
-
143
- @override
144
- def on_message(self, client: object, userdata: Any, msg: MqttMsg) -> None:
145
- if msg.topic == self.forecast_topic:
146
- em = json.loads(msg.payload.decode())
147
- self.on_forecast(em)
148
- else:
149
- super().on_message(client, userdata, msg)
150
-
151
- def on_forecast(self, em: dict) -> None:
152
- """Handle weather forecast data.
153
-
154
- Args:
155
- em (dict): forecast
156
- """
157
- # self.debug(f"VisualCrossing: got mqtt message {em}")
158
-
159
- @override
160
- def run(self) -> None:
161
- # create, initialize and start the asynchronous thread for acquiring forecast
162
-
163
- self.worker = cast(
164
- VisualCrossingThread, self.instantiate(VisualCrossing.workerThreadId)
165
- )
166
- self.worker.init(
167
- self.forecast_topic,
168
- self.base_url,
169
- self.update_interval,
170
- self.api_key,
171
- self.location,
172
- )
173
- self.debug(
174
- f"VisualCrossing run: {self.base_url}, {self.update_interval}s, location is {self.location}"
175
- )
176
- super().run()
177
-
178
- @override
179
- def to_dict(self) -> dict:
180
- data = super().to_dict()
181
- data["_visualcrossing"] = {
182
- "topic": self.forecast_topic,
183
- "url": self.base_url,
184
- "api_key": self.api_key,
185
- "interval": self.update_interval,
186
- }
187
- return data
188
-
189
- @override
190
- def from_dict(self, data) -> None:
191
- super().from_dict(data)
192
- if "_visualcrossing" in data:
193
- for key, value in data["_visualcrossing"].items():
194
- setattr(self, key, value)
1
+ from datetime import datetime, timedelta, timezone
2
+ import json
3
+ from typing_extensions import override
4
+ from typing import Any, Optional, cast
5
+ from masterpiece.mqtt import MqttMsg, Mqtt
6
+ from juham_core import JuhamThread, JuhamCloudThread
7
+
8
+
9
+ class VisualCrossingThread(JuhamCloudThread):
10
+ """Asynchronous thread for acquiring forecast from the VisualCrossing
11
+ site."""
12
+
13
+ # class attributes
14
+ _forecast_topic: str = ""
15
+ _base_url: str = ""
16
+ _api_key: str = ""
17
+ _location: str = ""
18
+ _interval: float = 12 * 3600
19
+
20
+ def __init__(self, client: Optional[Mqtt] = None):
21
+ """Construct with the given mqtt client. Acquires data from the visual
22
+ crossing web service and publishes the forecast data to
23
+ forecast_topic.
24
+
25
+ Args:
26
+ client (object, optional): MQTT client. Defaults to None.
27
+ """
28
+ super().__init__(client)
29
+ self.mqtt_client: Optional[Mqtt] = client
30
+
31
+ @override
32
+ def update_interval(self) -> float:
33
+ return self._interval
34
+
35
+ @override
36
+ def make_weburl(self) -> str:
37
+ if not self._api_key:
38
+ self.error("Uninitialized api_key {self.get_class_id()}: {self._api_key}")
39
+ return ""
40
+ else:
41
+ now = datetime.now()
42
+ end = now + timedelta(days=1)
43
+ start = now.strftime("%Y-%m-%d")
44
+ stop = end.strftime("%Y-%m-%d")
45
+ url = f"{self._base_url}{self._location}/{start}/{stop}?unitGroup=metric&contentType=json&include=hours&key={self._api_key}"
46
+ # self.debug(url)
47
+ return url
48
+
49
+ def init(
50
+ self, topic: str, base_url: str, interval: float, api_key: str, location: str
51
+ ) -> None:
52
+ """Initialize the data acquisition thread
53
+
54
+ Args:
55
+ topic (str): mqtt topic to publish the acquired data
56
+ base_url (str): url of the web service
57
+ interval (float): update interval in seconds
58
+ api_key (str): api_key, as required by the web service
59
+ location (str): geographic location
60
+ """
61
+ self._forecast_topic = topic
62
+ self._base_url = base_url
63
+ self._interval = interval
64
+ self._api_key = api_key
65
+ self._location = location
66
+
67
+ @override
68
+ def process_data(self, data: Any) -> None:
69
+ self.info("VisualCrossing process_data()")
70
+ data = data.json()
71
+ forecast = []
72
+ self.info(f"VisualCrossing {data}")
73
+ for day in data["days"]:
74
+ for hour in day["hours"]:
75
+ ts = int(hour["datetimeEpoch"])
76
+ forecast.append(
77
+ {
78
+ "id": "visualcrossing",
79
+ "ts": ts,
80
+ "hour": datetime.fromtimestamp(ts, tz=timezone.utc).strftime(
81
+ "%H"
82
+ ),
83
+ "day": datetime.fromtimestamp(ts, tz=timezone.utc).strftime(
84
+ "%Y%m%d%H"
85
+ ),
86
+ "uvindex": hour["uvindex"],
87
+ "solarradiation": hour["solarradiation"],
88
+ "solarenergy": hour["solarenergy"],
89
+ "cloudcover": hour["cloudcover"],
90
+ "snow": hour["snow"],
91
+ "snowdepth": hour["snowdepth"],
92
+ "pressure": hour["pressure"],
93
+ "temp": hour["temp"],
94
+ "humidity": hour["humidity"],
95
+ "windspeed": hour["windspeed"],
96
+ "winddir": hour["winddir"],
97
+ "dew": hour["dew"],
98
+ }
99
+ )
100
+ msg = json.dumps(forecast)
101
+ self.publish(self._forecast_topic, msg, qos=1, retain=True)
102
+ self.info(f"VisualCrossing forecast published to {self._forecast_topic}")
103
+
104
+
105
+ class VisualCrossing(JuhamThread):
106
+ """Constructs a data acquisition object for reading weather
107
+ forecasts from the VisualCrossing web service. Subscribes to the
108
+ forecast topic and writes hourly data such as solar energy, temperature,
109
+ and other attributes relevant to home automation into a time series
110
+ database.
111
+
112
+ Spawns an asynchronous thread to run queries at the specified
113
+ update_interval.
114
+ """
115
+
116
+ workerThreadId: str = VisualCrossingThread.get_class_id()
117
+ base_url: str = (
118
+ "https://weather.visualcrossing.com/VisualCrossingWebServices/rest/services/timeline/"
119
+ )
120
+ update_interval: float = 12 * 3600
121
+ api_key: str = "SE9W7EHP775N7NDNW8ANM2MZN"
122
+ location: str = "lahti,finland"
123
+
124
+ def __init__(self, name="visualcrossing") -> None:
125
+ """Constructs VisualCrossing automation object for acquiring and publishing
126
+ forecast data.
127
+
128
+ Args:
129
+ name (str, optional): name of the object. Defaults to "visualcrossing".
130
+ """
131
+ super().__init__(name)
132
+ self.worker: Optional[VisualCrossingThread] = None
133
+ self.forecast_topic: str = self.make_topic_name("forecast")
134
+ self.debug(f"VisualCrossing with name {name} created")
135
+
136
+ @override
137
+ def on_connect(self, client: object, userdata: Any, flags: int, rc: int) -> None:
138
+ super().on_connect(client, userdata, flags, rc)
139
+ if rc == 0:
140
+ self.subscribe(self.forecast_topic)
141
+ self.debug(f"VisualCrossing subscribed to topic {self.forecast_topic}")
142
+
143
+ @override
144
+ def on_message(self, client: object, userdata: Any, msg: MqttMsg) -> None:
145
+ if msg.topic == self.forecast_topic:
146
+ em = json.loads(msg.payload.decode())
147
+ self.on_forecast(em)
148
+ else:
149
+ super().on_message(client, userdata, msg)
150
+
151
+ def on_forecast(self, em: dict) -> None:
152
+ """Handle weather forecast data.
153
+
154
+ Args:
155
+ em (dict): forecast
156
+ """
157
+ # self.debug(f"VisualCrossing: got mqtt message {em}")
158
+
159
+ @override
160
+ def run(self) -> None:
161
+ # create, initialize and start the asynchronous thread for acquiring forecast
162
+
163
+ self.worker = cast(
164
+ VisualCrossingThread, self.instantiate(VisualCrossing.workerThreadId)
165
+ )
166
+ self.worker.init(
167
+ self.forecast_topic,
168
+ self.base_url,
169
+ self.update_interval,
170
+ self.api_key,
171
+ self.location,
172
+ )
173
+ self.debug(
174
+ f"VisualCrossing run: {self.base_url}, {self.update_interval}s, location is {self.location}"
175
+ )
176
+ super().run()
177
+
178
+ @override
179
+ def to_dict(self) -> dict:
180
+ data = super().to_dict()
181
+ data["_visualcrossing"] = {
182
+ "topic": self.forecast_topic,
183
+ "url": self.base_url,
184
+ "api_key": self.api_key,
185
+ "interval": self.update_interval,
186
+ }
187
+ return data
188
+
189
+ @override
190
+ def from_dict(self, data) -> None:
191
+ super().from_dict(data)
192
+ if "_visualcrossing" in data:
193
+ for key, value in data["_visualcrossing"].items():
194
+ setattr(self, key, value)
@@ -0,0 +1,18 @@
1
+ from ast import Str
2
+ from typing_extensions import override
3
+ from masterpiece import Plugin, Composite
4
+ from .visualcrossing import VisualCrossing
5
+
6
+
7
+ class VisualCrossingPlugin(Plugin):
8
+ """Plugin class, for installing a visualcrossing specific features into the host application."""
9
+
10
+ def __init__(self, name: str = "visual_crossing") -> None:
11
+ """Create visualcrossing weather service."""
12
+ super().__init__(name)
13
+
14
+ @override
15
+ def install(self, app: Composite) -> None:
16
+ # Create and insert a VisualCrossing classes into the host application.
17
+ obj = VisualCrossing()
18
+ app.add(obj)
@@ -1,88 +1,87 @@
1
- Metadata-Version: 2.1
2
- Name: juham_visualcrossing
3
- Version: 0.1.2
4
- Summary: A Weather forecast plugin extending `Juham` applications
5
- Author-email: J Meskanen <juham.api@gmail.com>
6
- Maintainer-email: "J. Meskanen" <juham.api@gmail.com>
7
- License: MIT License
8
- ===========
9
-
10
- Copyright (c) 2024, Juha Meskanen
11
-
12
- Permission is hereby granted, free of charge, to any person obtaining a copy
13
- of this software and associated documentation files (the "Software"), to deal
14
- in the Software without restriction, including without limitation the rights
15
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
16
- copies of the Software, and to permit persons to whom the Software is
17
- furnished to do so, subject to the following conditions:
18
-
19
- The above copyright notice and this permission notice shall be included in all
20
- copies or substantial portions of the Software.
21
-
22
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
23
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
24
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
25
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
26
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
27
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
28
-
29
-
30
- Project-URL: Homepage, https://meskanen.com
31
- Project-URL: Bug Reports, https://meskanen.com
32
- Project-URL: Funding, https://meskanen.com
33
- Project-URL: Say Thanks!, http://meskanen.com
34
- Project-URL: Source, https://meskanen.com
35
- Keywords: object-oriented,plugin,framework
36
- Classifier: Development Status :: 2 - Pre-Alpha
37
- Classifier: Intended Audience :: Developers
38
- Classifier: Topic :: Software Development
39
- Classifier: License :: OSI Approved :: MIT License
40
- Classifier: Programming Language :: Python :: 3.8
41
- Requires-Python: >=3.8
42
- Description-Content-Type: text/markdown
43
- Requires-Dist: juham>=0.1.3
44
- Requires-Dist: pytz>=2024.1
45
- Requires-Dist: importlib-metadata
46
- Provides-Extra: dev
47
- Requires-Dist: check-manifest; extra == "dev"
48
-
49
- juham_visualcrossing
50
- ====================
51
-
52
- `juham_visualcrossing` plugs VisualCrossing weather forecast service to Juham - Juha's Ultimate
53
- Home Automation Masterpiece application.
54
-
55
-
56
-
57
- Features
58
- --------
59
-
60
- The main purpose is to acquire solar energy forecast, for optimizing energy management in
61
- homes with solar panels.
62
-
63
-
64
- Installation
65
- ------------
66
-
67
- The installation is two stage process
68
-
69
- 1. To install:
70
-
71
- .. code-block:: python
72
-
73
- pip install juham_visualcrossing
74
-
75
-
76
- 2. Configure
77
-
78
- VisualCrossing requires you to register and obtain web key, through which you can
79
- access their forecast services. So sign in to visualcrossing.com to obtain the key,
80
- and then add the web key to the '~/.[app]/config/VisualCrossing.json' configuration
81
- file.
82
-
83
-
84
-
85
- License
86
- -------
87
-
88
- This project is licensed under the MIT License - see the `LICENSE` file for details.
1
+ Metadata-Version: 2.2
2
+ Name: juham-visualcrossing
3
+ Version: 0.1.8
4
+ Summary: A Weather forecast plugin extending `Juham` applications
5
+ Author-email: J Meskanen <juham.api@gmail.com>
6
+ Maintainer-email: "J. Meskanen" <juham.api@gmail.com>
7
+ License: MIT License
8
+ ===========
9
+
10
+ Copyright (c) 2024, Juha Meskanen
11
+
12
+ Permission is hereby granted, free of charge, to any person obtaining a copy
13
+ of this software and associated documentation files (the "Software"), to deal
14
+ in the Software without restriction, including without limitation the rights
15
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
16
+ copies of the Software, and to permit persons to whom the Software is
17
+ furnished to do so, subject to the following conditions:
18
+
19
+ The above copyright notice and this permission notice shall be included in all
20
+ copies or substantial portions of the Software.
21
+
22
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
23
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
24
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
25
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
26
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
27
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
28
+
29
+
30
+ Project-URL: Homepage, https://gitlab.com/juham/juham/juham-visualcrossing
31
+ Project-URL: Bug Reports, https://gitlab.com/juham/juham/juham-visualcrossing
32
+ Project-URL: Funding, https://meskanen.com
33
+ Project-URL: Say Thanks!, http://meskanen.com
34
+ Project-URL: Source, https://gitlab.com/juham/juham/juham-visualcrossing
35
+ Keywords: object-oriented,plugin,framework
36
+ Classifier: Development Status :: 3 - Alpha
37
+ Classifier: Intended Audience :: Developers
38
+ Classifier: Topic :: Software Development
39
+ Classifier: License :: OSI Approved :: MIT License
40
+ Classifier: Programming Language :: Python :: 3.8
41
+ Requires-Python: >=3.8
42
+ Description-Content-Type: text/x-rst
43
+ License-File: LICENSE.rst
44
+ Requires-Dist: juham-core>=0.1.1
45
+ Requires-Dist: pytz>=2024.1
46
+ Provides-Extra: dev
47
+ Requires-Dist: check-manifest; extra == "dev"
48
+
49
+ VisualCrossing forecast plugin for Juham™
50
+ =========================================
51
+
52
+ Description
53
+ -----------
54
+
55
+ Adds forecast support to Juham™ home automation.
56
+
57
+ .. image:: _static/images/visualcrossing.png
58
+ :alt: Solar and temperature forecasts
59
+ :width: 640px
60
+ :align: center
61
+
62
+
63
+ Project Status
64
+ --------------
65
+
66
+ **Current State**: **Alpha (Status 3)**
67
+
68
+ Please check out the `CHANGELOG <CHANGELOG.rst>`_ file for changes in this release.
69
+
70
+
71
+
72
+ Getting Started
73
+ ---------------
74
+
75
+ ### Installation
76
+
77
+ 1. Install
78
+
79
+ .. code-block:: bash
80
+
81
+ pip install juham_visualcrossing
82
+
83
+
84
+ 2. Configure
85
+
86
+ - ``VisualCrossing.json``: Add your Visual Crossing API key for weather forecasts.
87
+
@@ -1,15 +1,11 @@
1
+ LICENSE.rst
1
2
  MANIFEST.in
2
3
  README.rst
3
4
  pyproject.toml
4
- docs/source/LICENSE.rst
5
- docs/source/README.rst
6
- docs/source/CHANGELOG.rst
7
- docs/source/CONTRIBUTING.rst
8
- docs/source/LICENSE.rst
9
- docs/source/README.rst
10
5
  juham_visualcrossing/__init__.py
11
6
  juham_visualcrossing/py.typed
12
7
  juham_visualcrossing/visualcrossing.py
8
+ juham_visualcrossing/visualcrossing_plugin.py
13
9
  juham_visualcrossing.egg-info/PKG-INFO
14
10
  juham_visualcrossing.egg-info/SOURCES.txt
15
11
  juham_visualcrossing.egg-info/dependency_links.txt
@@ -17,6 +13,4 @@ juham_visualcrossing.egg-info/entry_points.txt
17
13
  juham_visualcrossing.egg-info/requires.txt
18
14
  juham_visualcrossing.egg-info/top_level.txt
19
15
  tests/__init__.py
20
- tests/test_visualcrossing.py
21
- tests/__pycache__/__init__.cpython-312.pyc
22
- tests/__pycache__/test_visualcrossing.cpython-312.pyc
16
+ tests/test_visualcrossing.py
@@ -0,0 +1,2 @@
1
+ [juham.plugins]
2
+ visualcrossing_plugin = juham_visualcrossing:VisualCrossingPlugin
@@ -1,6 +1,5 @@
1
- juham>=0.1.3
1
+ juham-core>=0.1.1
2
2
  pytz>=2024.1
3
- importlib-metadata
4
3
 
5
4
  [dev]
6
5
  check-manifest
@@ -1,57 +1,58 @@
1
-
2
- [build-system]
3
- requires = ["setuptools"]
4
- build-backend = "setuptools.build_meta"
5
-
6
-
7
- [project]
8
- name = "juham_visualcrossing"
9
- version = "0.1.2"
10
- description = "A Weather forecast plugin extending `Juham` applications"
11
- readme = {file = "docs/source/README.rst", content-type = "text/markdown"}
12
- requires-python = ">=3.8"
13
- license = {file = "docs/source/LICENSE.rst", content-type = "text/markdown"}
14
- keywords = ["object-oriented", "plugin", "framework"]
15
- authors = [
16
- {name = "J Meskanen", email = "juham.api@gmail.com" }
17
- ]
18
- maintainers = [
19
- {name = "J. Meskanen", email = "juham.api@gmail.com" }
20
- ]
21
-
22
- classifiers = [
23
- "Development Status :: 2 - Pre-Alpha",
24
- "Intended Audience :: Developers",
25
- "Topic :: Software Development",
26
- "License :: OSI Approved :: MIT License",
27
- "Programming Language :: Python :: 3.8",
28
- ]
29
-
30
- dependencies = [
31
- "juham >= 0.1.3",
32
- "pytz >= 2024.1",
33
- "importlib-metadata"
34
- ]
35
-
36
-
37
- [project.optional-dependencies]
38
- dev = ["check-manifest"]
39
-
40
-
41
- [project.entry-points."juham.plugins"]
42
- visualcrossing_plugin = "juham_visualcrossing:VisualCrossing"
43
-
44
-
45
-
46
- [project.urls]
47
- "Homepage" = "https://meskanen.com"
48
- "Bug Reports" = "https://meskanen.com"
49
- "Funding" = "https://meskanen.com"
50
- "Say Thanks!" = "http://meskanen.com"
51
- "Source" = "https://meskanen.com"
52
-
53
-
54
-
55
- [tool.mypy]
56
- files = ["juham_visualcrossing"]
57
- ignore_missing_imports = true
1
+
2
+ [build-system]
3
+ requires = ["setuptools"]
4
+ build-backend = "setuptools.build_meta"
5
+
6
+
7
+ [tool.setuptools]
8
+ include-package-data = true
9
+ packages = ["juham_visualcrossing"]
10
+
11
+ [project]
12
+ name = "juham-visualcrossing"
13
+ version = "0.1.8"
14
+ requires-python = ">=3.8"
15
+ description = "A Weather forecast plugin extending `Juham` applications"
16
+ readme = {file = "README.rst", content-type = "text/x-rst"}
17
+ license = {file = "LICENSE.rst", content-type = "text/x-rst"}
18
+ keywords = ["object-oriented", "plugin", "framework"]
19
+ authors = [
20
+ {name = "J Meskanen", email = "juham.api@gmail.com" }
21
+ ]
22
+ maintainers = [
23
+ {name = "J. Meskanen", email = "juham.api@gmail.com" }
24
+ ]
25
+
26
+ classifiers = [
27
+ "Development Status :: 3 - Alpha",
28
+ "Intended Audience :: Developers",
29
+ "Topic :: Software Development",
30
+ "License :: OSI Approved :: MIT License",
31
+ "Programming Language :: Python :: 3.8",
32
+ ]
33
+
34
+ dependencies = [
35
+ "juham-core >= 0.1.1",
36
+ "pytz >= 2024.1",
37
+ ]
38
+
39
+
40
+ [project.optional-dependencies]
41
+ dev = ["check-manifest"]
42
+
43
+
44
+ [project.entry-points."juham.plugins"]
45
+ visualcrossing_plugin = "juham_visualcrossing:VisualCrossingPlugin"
46
+
47
+
48
+ [project.urls]
49
+ "Homepage" = "https://gitlab.com/juham/juham/juham-visualcrossing"
50
+ "Bug Reports" = "https://gitlab.com/juham/juham/juham-visualcrossing"
51
+ "Funding" = "https://meskanen.com"
52
+ "Say Thanks!" = "http://meskanen.com"
53
+ "Source" = "https://gitlab.com/juham/juham/juham-visualcrossing"
54
+
55
+
56
+ [tool.mypy]
57
+ files = ["juham_visualcrossing"]
58
+ ignore_missing_imports = true
@@ -1,4 +1,4 @@
1
- [egg_info]
2
- tag_build =
3
- tag_date = 0
4
-
1
+ [egg_info]
2
+ tag_build =
3
+ tag_date = 0
4
+
@@ -1,16 +1,16 @@
1
- import unittest
2
-
3
- from juham_visualcrossing.visualcrossing import VisualCrossing
4
-
5
-
6
- class TestVisualCrossing(unittest.TestCase):
7
- """Unit tests for `VisualCrossing` weather forecast masterpiece."""
8
-
9
- def test_get_classid(self):
10
- """Assert that the meta-class driven class initialization works."""
11
- classid = VisualCrossing.get_class_id()
12
- self.assertEqual("VisualCrossing", classid)
13
-
14
-
15
- if __name__ == "__main__":
16
- unittest.main()
1
+ import unittest
2
+
3
+ from juham_visualcrossing.visualcrossing import VisualCrossing
4
+
5
+
6
+ class TestVisualCrossing(unittest.TestCase):
7
+ """Unit tests for `VisualCrossing` weather forecast masterpiece."""
8
+
9
+ def test_get_classid(self):
10
+ """Assert that the meta-class driven class initialization works."""
11
+ classid = VisualCrossing.get_class_id()
12
+ self.assertEqual("VisualCrossing", classid)
13
+
14
+
15
+ if __name__ == "__main__":
16
+ unittest.main()
@@ -1,8 +0,0 @@
1
- Changelog
2
- =========
3
-
4
- [0.0.1] - August 4, 2024
5
- ------------------------
6
-
7
- ### Initial release
8
-
@@ -1,56 +0,0 @@
1
- Contributing
2
- ============
3
-
4
-
5
- Thank You!
6
- ----------
7
-
8
- Thank you in advance for your forthcoming contributions, whether they are bug fixes,
9
- documentation improvements, entirely new features, or simply feedback. Your efforts
10
- will be highly appreciated and will help turn this project from its current mission
11
- state into an actual masterpiece.
12
-
13
-
14
- Design Patterns
15
- ---------------
16
-
17
- Please read the developer documentation and understand the few design patterns before contributing.
18
- This will help ensure that your contributions align with the project's design and goals.
19
- .. todo:: (okay, the documentation is currently lacking many essential chapters, add.)
20
-
21
-
22
- Code Formatting
23
- ---------------
24
-
25
- To help maintain consistent code formatting across different developers, we use 'black' python formatter, by Microsoft.
26
-
27
- Strange, the formatter doesn't seem to format that much, it doesn't organize imports,
28
- doesn't adjust docstring lenghts
29
- .. todo:: most likely I don't know how to use it properly, read the docs.
30
-
31
-
32
- Building and Packaging
33
- ----------------------
34
-
35
- Despite my attempts to fall in love with Eclipse, VSCode and other IDEs, I still find Makefile and Emacs the best
36
- tools for many of my workflows.
37
- So there is a Makefile in the root folder. For those old dogs who are like me
38
- ::
39
-
40
- make help
41
-
42
- To create python package out of the 'pyproj.toml':
43
- ::
44
-
45
- make build
46
-
47
- To install using 'venv':
48
- ::
49
-
50
- make install
51
-
52
-
53
- More Stuff
54
- ----------
55
- .. todo:: add more stuff, later.
56
-
@@ -1,40 +0,0 @@
1
- juham_visualcrossing
2
- ====================
3
-
4
- `juham_visualcrossing` plugs VisualCrossing weather forecast service to Juham - Juha's Ultimate
5
- Home Automation Masterpiece application.
6
-
7
-
8
-
9
- Features
10
- --------
11
-
12
- The main purpose is to acquire solar energy forecast, for optimizing energy management in
13
- homes with solar panels.
14
-
15
-
16
- Installation
17
- ------------
18
-
19
- The installation is two stage process
20
-
21
- 1. To install:
22
-
23
- .. code-block:: python
24
-
25
- pip install juham_visualcrossing
26
-
27
-
28
- 2. Configure
29
-
30
- VisualCrossing requires you to register and obtain web key, through which you can
31
- access their forecast services. So sign in to visualcrossing.com to obtain the key,
32
- and then add the web key to the '~/.[app]/config/VisualCrossing.json' configuration
33
- file.
34
-
35
-
36
-
37
- License
38
- -------
39
-
40
- This project is licensed under the MIT License - see the `LICENSE` file for details.
@@ -1,13 +0,0 @@
1
- """
2
- Description
3
- ===========
4
-
5
- VisualCrossing weather forecast.
6
-
7
- """
8
-
9
- from .visualcrossing import VisualCrossing
10
-
11
- __all__ = [
12
- "VisualCrossing",
13
- ]
@@ -1,2 +0,0 @@
1
- [juham.plugins]
2
- visualcrossing_plugin = juham_visualcrossing:VisualCrossing