hamsclientfork 0.2.8__tar.gz → 0.2.10__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.8/hamsclientfork.egg-info → hamsclientfork-0.2.10}/PKG-INFO +5 -1
- {hamsclientfork-0.2.8 → hamsclientfork-0.2.10}/hamsclientfork/client.py +17 -12
- {hamsclientfork-0.2.8 → hamsclientfork-0.2.10/hamsclientfork.egg-info}/PKG-INFO +5 -1
- {hamsclientfork-0.2.8 → hamsclientfork-0.2.10}/setup.py +1 -1
- {hamsclientfork-0.2.8 → hamsclientfork-0.2.10}/.gitignore +0 -0
- {hamsclientfork-0.2.8 → hamsclientfork-0.2.10}/LICENSE +0 -0
- {hamsclientfork-0.2.8 → hamsclientfork-0.2.10}/README.md +0 -0
- {hamsclientfork-0.2.8 → hamsclientfork-0.2.10}/README.rst +0 -0
- {hamsclientfork-0.2.8 → hamsclientfork-0.2.10}/hamsclientfork/__init__.py +0 -0
- {hamsclientfork-0.2.8 → hamsclientfork-0.2.10}/hamsclientfork/__main__.py +0 -0
- {hamsclientfork-0.2.8 → hamsclientfork-0.2.10}/hamsclientfork/py.typed +0 -0
- {hamsclientfork-0.2.8 → hamsclientfork-0.2.10}/hamsclientfork.egg-info/SOURCES.txt +0 -0
- {hamsclientfork-0.2.8 → hamsclientfork-0.2.10}/hamsclientfork.egg-info/dependency_links.txt +0 -0
- {hamsclientfork-0.2.8 → hamsclientfork-0.2.10}/hamsclientfork.egg-info/requires.txt +0 -0
- {hamsclientfork-0.2.8 → hamsclientfork-0.2.10}/hamsclientfork.egg-info/top_level.txt +0 -0
- {hamsclientfork-0.2.8 → hamsclientfork-0.2.10}/setup.cfg +0 -0
- {hamsclientfork-0.2.8 → hamsclientfork-0.2.10}/tox.ini +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: hamsclientfork
|
|
3
|
-
Version: 0.2.
|
|
3
|
+
Version: 0.2.10
|
|
4
4
|
Summary: Library to get data from meteo swiss
|
|
5
5
|
Home-page: https://github.com/Rudd-O/hamsclientfork
|
|
6
6
|
Author: websylv
|
|
@@ -15,6 +15,10 @@ Classifier: Programming Language :: Python :: 3.9
|
|
|
15
15
|
Classifier: Programming Language :: Python :: 3.10
|
|
16
16
|
Classifier: Programming Language :: Python :: 3.11
|
|
17
17
|
License-File: LICENSE
|
|
18
|
+
Requires-Dist: requests>=2.22.0
|
|
19
|
+
Requires-Dist: pandas>=0.25.3
|
|
20
|
+
Requires-Dist: beautifulsoup4>=4.8.2
|
|
21
|
+
Requires-Dist: geopy>=2.0.0
|
|
18
22
|
|
|
19
23
|
meteoswiss
|
|
20
24
|
==========
|
|
@@ -325,21 +325,26 @@ class meteoSwissClient:
|
|
|
325
325
|
_LOGGER.warning("Unable to find station name for : %s" % (stationId))
|
|
326
326
|
return None
|
|
327
327
|
|
|
328
|
-
def getGeoData(self, lat, lon):
|
|
328
|
+
def getGeoData(self, lat, lon, user_agent=None):
|
|
329
329
|
s = requests.Session()
|
|
330
|
-
lat = str(lat)
|
|
331
|
-
lon = str(lon)
|
|
332
330
|
s.headers.update(_HEADERS)
|
|
331
|
+
if user_agent:
|
|
332
|
+
s.headers.update({"User-Agent": user_agent})
|
|
333
333
|
|
|
334
|
-
|
|
335
|
-
"https://nominatim.openstreetmap.org/reverse
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
334
|
+
uri = (
|
|
335
|
+
"https://nominatim.openstreetmap.org/reverse"
|
|
336
|
+
f"?format=jsonv2&lat={lat}&lon={lon}&zoom=18"
|
|
337
|
+
)
|
|
338
|
+
_LOGGER.debug("Requesting Nominatim OSM data at URL %s", uri)
|
|
339
|
+
geoData_req = s.get(uri)
|
|
340
|
+
try:
|
|
341
|
+
geoData_req.raise_for_status()
|
|
342
|
+
geoData = geoData_req.json()
|
|
343
|
+
_LOGGER.debug("Got data from OpenStreetMap: %s" % (geoData))
|
|
344
|
+
return geoData
|
|
345
|
+
except Exception:
|
|
346
|
+
_LOGGER.exception("Cannot get Nominatim OSM data: %s", geoData_req.text)
|
|
347
|
+
raise
|
|
343
348
|
|
|
344
349
|
def getPostCode(self, lat, lon):
|
|
345
350
|
geoData = self.getGeoData(lat, lon)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: hamsclientfork
|
|
3
|
-
Version: 0.2.
|
|
3
|
+
Version: 0.2.10
|
|
4
4
|
Summary: Library to get data from meteo swiss
|
|
5
5
|
Home-page: https://github.com/Rudd-O/hamsclientfork
|
|
6
6
|
Author: websylv
|
|
@@ -15,6 +15,10 @@ Classifier: Programming Language :: Python :: 3.9
|
|
|
15
15
|
Classifier: Programming Language :: Python :: 3.10
|
|
16
16
|
Classifier: Programming Language :: Python :: 3.11
|
|
17
17
|
License-File: LICENSE
|
|
18
|
+
Requires-Dist: requests>=2.22.0
|
|
19
|
+
Requires-Dist: pandas>=0.25.3
|
|
20
|
+
Requires-Dist: beautifulsoup4>=4.8.2
|
|
21
|
+
Requires-Dist: geopy>=2.0.0
|
|
18
22
|
|
|
19
23
|
meteoswiss
|
|
20
24
|
==========
|
|
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
|
|
File without changes
|