hamsclientfork 0.2.19__tar.gz → 0.2.20__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.
- {hamsclientfork-0.2.19/hamsclientfork.egg-info → hamsclientfork-0.2.20}/PKG-INFO +11 -2
- {hamsclientfork-0.2.19 → hamsclientfork-0.2.20}/hamsclientfork/__init__.py +2 -2
- {hamsclientfork-0.2.19 → hamsclientfork-0.2.20}/hamsclientfork/client.py +13 -10
- {hamsclientfork-0.2.19 → hamsclientfork-0.2.20/hamsclientfork.egg-info}/PKG-INFO +11 -2
- {hamsclientfork-0.2.19 → hamsclientfork-0.2.20}/setup.py +9 -4
- {hamsclientfork-0.2.19 → hamsclientfork-0.2.20}/.gitignore +0 -0
- {hamsclientfork-0.2.19 → hamsclientfork-0.2.20}/LICENSE +0 -0
- {hamsclientfork-0.2.19 → hamsclientfork-0.2.20}/README.md +0 -0
- {hamsclientfork-0.2.19 → hamsclientfork-0.2.20}/README.rst +0 -0
- {hamsclientfork-0.2.19 → hamsclientfork-0.2.20}/hamsclientfork/__main__.py +0 -0
- {hamsclientfork-0.2.19 → hamsclientfork-0.2.20}/hamsclientfork/py.typed +0 -0
- {hamsclientfork-0.2.19 → hamsclientfork-0.2.20}/hamsclientfork.egg-info/SOURCES.txt +0 -0
- {hamsclientfork-0.2.19 → hamsclientfork-0.2.20}/hamsclientfork.egg-info/dependency_links.txt +0 -0
- {hamsclientfork-0.2.19 → hamsclientfork-0.2.20}/hamsclientfork.egg-info/requires.txt +0 -0
- {hamsclientfork-0.2.19 → hamsclientfork-0.2.20}/hamsclientfork.egg-info/top_level.txt +0 -0
- {hamsclientfork-0.2.19 → hamsclientfork-0.2.20}/setup.cfg +0 -0
- {hamsclientfork-0.2.19 → hamsclientfork-0.2.20}/tox.ini +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
2
|
Name: hamsclientfork
|
|
3
|
-
Version: 0.2.
|
|
3
|
+
Version: 0.2.20
|
|
4
4
|
Summary: Library to get data from meteo swiss
|
|
5
5
|
Home-page: https://github.com/Rudd-O/hamsclientfork
|
|
6
6
|
Author: websylv
|
|
@@ -18,6 +18,15 @@ License-File: LICENSE
|
|
|
18
18
|
Requires-Dist: requests>=2.22.0
|
|
19
19
|
Requires-Dist: beautifulsoup4>=4.8.2
|
|
20
20
|
Requires-Dist: geopy>=2.0.0
|
|
21
|
+
Dynamic: author
|
|
22
|
+
Dynamic: author-email
|
|
23
|
+
Dynamic: classifier
|
|
24
|
+
Dynamic: description
|
|
25
|
+
Dynamic: home-page
|
|
26
|
+
Dynamic: license
|
|
27
|
+
Dynamic: license-file
|
|
28
|
+
Dynamic: requires-dist
|
|
29
|
+
Dynamic: summary
|
|
21
30
|
|
|
22
31
|
meteoswiss
|
|
23
32
|
==========
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"""meteoswiss - Library to get data from meteo swiss"""
|
|
2
2
|
|
|
3
|
-
__version__ = "0.2.
|
|
3
|
+
__version__ = "0.2.20"
|
|
4
4
|
__author__ = "websylv <div@webhu.org>"
|
|
5
5
|
__all__ = ["meteoSwissClient", "StationType"]
|
|
6
6
|
|
|
7
|
-
from .client import
|
|
7
|
+
from .client import StationType, meteoSwissClient
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
1
|
+
import csv
|
|
2
|
+
import datetime
|
|
3
3
|
import json
|
|
4
4
|
import logging
|
|
5
|
-
import requests # type: ignore
|
|
6
|
-
import datetime
|
|
7
|
-
import csv
|
|
8
|
-
|
|
9
|
-
from bs4 import BeautifulSoup
|
|
10
5
|
from enum import Enum
|
|
11
6
|
from typing import Any, TypedDict
|
|
12
7
|
|
|
8
|
+
import geopy
|
|
9
|
+
import geopy.distance
|
|
10
|
+
import requests # type: ignore
|
|
11
|
+
from bs4 import BeautifulSoup
|
|
12
|
+
|
|
13
13
|
|
|
14
14
|
class StationType(str, Enum):
|
|
15
15
|
"""Station type."""
|
|
@@ -313,13 +313,16 @@ class meteoSwissClient:
|
|
|
313
313
|
for station in self._stations:
|
|
314
314
|
_LOGGER.debug("Get current condition for : %s" % station)
|
|
315
315
|
stationData = [d for d in data if d["Station/Location"] == station]
|
|
316
|
+
_LOGGER.debug("stationData: %s", stationData)
|
|
316
317
|
rainData = [d for d in rain_data if d["Station/Location"] == station]
|
|
318
|
+
_LOGGER.debug("rainData: %s", rainData)
|
|
317
319
|
if rainData and not stationData:
|
|
318
320
|
stationData = rainData
|
|
319
321
|
elif rainData and stationData:
|
|
320
|
-
# Add all values from
|
|
321
|
-
for
|
|
322
|
-
|
|
322
|
+
# Add all values from each rain data to each station data.
|
|
323
|
+
for sd, rd in zip(stationData, rainData):
|
|
324
|
+
for k, v in rd.items():
|
|
325
|
+
sd[k] = v
|
|
323
326
|
else:
|
|
324
327
|
# if
|
|
325
328
|
# (stationData and not rainData)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
2
|
Name: hamsclientfork
|
|
3
|
-
Version: 0.2.
|
|
3
|
+
Version: 0.2.20
|
|
4
4
|
Summary: Library to get data from meteo swiss
|
|
5
5
|
Home-page: https://github.com/Rudd-O/hamsclientfork
|
|
6
6
|
Author: websylv
|
|
@@ -18,6 +18,15 @@ License-File: LICENSE
|
|
|
18
18
|
Requires-Dist: requests>=2.22.0
|
|
19
19
|
Requires-Dist: beautifulsoup4>=4.8.2
|
|
20
20
|
Requires-Dist: geopy>=2.0.0
|
|
21
|
+
Dynamic: author
|
|
22
|
+
Dynamic: author-email
|
|
23
|
+
Dynamic: classifier
|
|
24
|
+
Dynamic: description
|
|
25
|
+
Dynamic: home-page
|
|
26
|
+
Dynamic: license
|
|
27
|
+
Dynamic: license-file
|
|
28
|
+
Dynamic: requires-dist
|
|
29
|
+
Dynamic: summary
|
|
21
30
|
|
|
22
31
|
meteoswiss
|
|
23
32
|
==========
|
|
@@ -2,11 +2,10 @@ import io
|
|
|
2
2
|
import os
|
|
3
3
|
import re
|
|
4
4
|
|
|
5
|
-
from setuptools import find_packages
|
|
6
|
-
from setuptools import setup
|
|
5
|
+
from setuptools import find_packages, setup
|
|
7
6
|
|
|
8
7
|
|
|
9
|
-
def read(filename):
|
|
8
|
+
def read(filename: str):
|
|
10
9
|
filename = os.path.join(os.path.dirname(__file__), filename)
|
|
11
10
|
text_type = type("")
|
|
12
11
|
with io.open(filename, mode="r", encoding="utf-8") as fd:
|
|
@@ -15,7 +14,13 @@ def read(filename):
|
|
|
15
14
|
|
|
16
15
|
setup(
|
|
17
16
|
name="hamsclientfork",
|
|
18
|
-
version=
|
|
17
|
+
version=[
|
|
18
|
+
ln
|
|
19
|
+
for ln in read("hamsclientfork/__init__.py").splitlines()
|
|
20
|
+
if ln.startswith("__version__")
|
|
21
|
+
][0]
|
|
22
|
+
.partition(" = ")[2]
|
|
23
|
+
.replace('"', ""),
|
|
19
24
|
url="https://github.com/Rudd-O/hamsclientfork",
|
|
20
25
|
license="MIT",
|
|
21
26
|
author="websylv",
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{hamsclientfork-0.2.19 → hamsclientfork-0.2.20}/hamsclientfork.egg-info/dependency_links.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|