lhpapi 1.0.0__tar.gz → 1.0.2__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.
- lhpapi-1.0.2/.gitignore +4 -0
- lhpapi-1.0.2/CHANGELOG.md +12 -0
- {lhpapi-1.0.0 → lhpapi-1.0.2}/PKG-INFO +2 -2
- {lhpapi-1.0.0 → lhpapi-1.0.2}/pyproject.toml +8 -2
- {lhpapi-1.0.0 → lhpapi-1.0.2}/src/lhpapi/be_api.py +2 -0
- {lhpapi-1.0.0 → lhpapi-1.0.2}/src/lhpapi/sn_api.py +1 -1
- lhpapi-1.0.0/.gitignore +0 -1
- {lhpapi-1.0.0 → lhpapi-1.0.2}/LICENSE +0 -0
- {lhpapi-1.0.0 → lhpapi-1.0.2}/README.md +0 -0
- {lhpapi-1.0.0 → lhpapi-1.0.2}/src/lhpapi/__init__.py +0 -0
- {lhpapi-1.0.0 → lhpapi-1.0.2}/src/lhpapi/api_utils.py +0 -0
- {lhpapi-1.0.0 → lhpapi-1.0.2}/src/lhpapi/bb_api.py +0 -0
- {lhpapi-1.0.0 → lhpapi-1.0.2}/src/lhpapi/bw_api.py +0 -0
- {lhpapi-1.0.0 → lhpapi-1.0.2}/src/lhpapi/by_api.py +0 -0
- {lhpapi-1.0.0 → lhpapi-1.0.2}/src/lhpapi/hb_api.py +0 -0
- {lhpapi-1.0.0 → lhpapi-1.0.2}/src/lhpapi/he_api.py +0 -0
- {lhpapi-1.0.0 → lhpapi-1.0.2}/src/lhpapi/hh_api.py +0 -0
- {lhpapi-1.0.0 → lhpapi-1.0.2}/src/lhpapi/mv_api.py +0 -0
- {lhpapi-1.0.0 → lhpapi-1.0.2}/src/lhpapi/ni_api.py +0 -0
- {lhpapi-1.0.0 → lhpapi-1.0.2}/src/lhpapi/nw_api.py +0 -0
- {lhpapi-1.0.0 → lhpapi-1.0.2}/src/lhpapi/rp_api.py +0 -0
- {lhpapi-1.0.0 → lhpapi-1.0.2}/src/lhpapi/sh_api.py +0 -0
- {lhpapi-1.0.0 → lhpapi-1.0.2}/src/lhpapi/sl_api.py +0 -0
- {lhpapi-1.0.0 → lhpapi-1.0.2}/src/lhpapi/st_api.py +0 -0
- {lhpapi-1.0.0 → lhpapi-1.0.2}/src/lhpapi/th_api.py +0 -0
lhpapi-1.0.2/.gitignore
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
## 1.0.2 (2024-03-03)
|
|
2
|
+
### Fixed
|
|
3
|
+
- Update minimum required Python version to 3.11 due to usage of datetime.UTC
|
|
4
|
+
|
|
5
|
+
## 1.0.1 (2024-03-02)
|
|
6
|
+
### Fixed
|
|
7
|
+
- Fix `last_update` for BE pegel
|
|
8
|
+
- Fix `stage` for SN pegel
|
|
9
|
+
|
|
10
|
+
## 1.0.0 (2024-03-02)
|
|
11
|
+
### Added
|
|
12
|
+
- Extract lhpapi from Home Assistant hochwasserportal integration
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: lhpapi
|
|
3
|
-
Version: 1.0.
|
|
3
|
+
Version: 1.0.2
|
|
4
4
|
Summary: API to retrieve data from the Länderübergreifendes Hochwasser Portal (LHP)
|
|
5
5
|
Project-URL: Homepage, https://github.com/stephan192/lhpapi
|
|
6
6
|
Project-URL: Issues, https://github.com/stephan192/lhpapi/issues
|
|
@@ -11,7 +11,7 @@ Classifier: Development Status :: 5 - Production/Stable
|
|
|
11
11
|
Classifier: License :: OSI Approved :: MIT License
|
|
12
12
|
Classifier: Operating System :: OS Independent
|
|
13
13
|
Classifier: Programming Language :: Python :: 3
|
|
14
|
-
Requires-Python: >=3.
|
|
14
|
+
Requires-Python: >=3.11
|
|
15
15
|
Requires-Dist: beautifulsoup4>=4.12.2
|
|
16
16
|
Requires-Dist: lxml>=4.9.4
|
|
17
17
|
Requires-Dist: requests>=2.31.0
|
|
@@ -4,13 +4,13 @@ build-backend = "hatchling.build"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "lhpapi"
|
|
7
|
-
version = "1.0.
|
|
7
|
+
version = "1.0.2"
|
|
8
8
|
authors = [
|
|
9
9
|
{ name="stephan192", email="stephan192@outlook.com" },
|
|
10
10
|
]
|
|
11
11
|
description = "API to retrieve data from the Länderübergreifendes Hochwasser Portal (LHP)"
|
|
12
12
|
readme = "README.md"
|
|
13
|
-
requires-python = ">=3.
|
|
13
|
+
requires-python = ">=3.11"
|
|
14
14
|
keywords = ["lhpapi", "lhp", "hochwasser"]
|
|
15
15
|
classifiers = [
|
|
16
16
|
"Development Status :: 5 - Production/Stable",
|
|
@@ -44,3 +44,9 @@ recursive = true
|
|
|
44
44
|
|
|
45
45
|
[tool.pylint.'MESSAGES CONTROL']
|
|
46
46
|
disable = 'duplicate-code'
|
|
47
|
+
|
|
48
|
+
[tool.pytest.ini_options]
|
|
49
|
+
pythonpath = "src"
|
|
50
|
+
addopts = [
|
|
51
|
+
"--import-mode=importlib",
|
|
52
|
+
]
|
|
@@ -65,6 +65,7 @@ def update_BE(static_data: StaticData) -> DynamicData: # pylint: disable=invali
|
|
|
65
65
|
if len(values) == 2:
|
|
66
66
|
level = convert_to_float(values[1], True)
|
|
67
67
|
if (level is not None) and (int(level) != -777):
|
|
68
|
+
values[0] = values[0].replace('"', "")
|
|
68
69
|
last_update = convert_to_datetime(values[0], "%d.%m.%Y %H:%M")
|
|
69
70
|
if (level is not None) and (last_update is not None):
|
|
70
71
|
break
|
|
@@ -85,6 +86,7 @@ def update_BE(static_data: StaticData) -> DynamicData: # pylint: disable=invali
|
|
|
85
86
|
and (int(flow) != -777)
|
|
86
87
|
and (last_update is None)
|
|
87
88
|
):
|
|
89
|
+
values[0] = values[0].replace('"', "")
|
|
88
90
|
last_update = convert_to_datetime(values[0], "%d.%m.%Y %H:%M")
|
|
89
91
|
if (flow is not None) and (last_update is not None):
|
|
90
92
|
break
|
|
@@ -56,7 +56,7 @@ def update_SN(static_data: StaticData) -> DynamicData: # pylint: disable=invali
|
|
|
56
56
|
data = link.find_next("div", class_="popUpStatus")
|
|
57
57
|
if (
|
|
58
58
|
"style" in data.attrs
|
|
59
|
-
and isinstance(data.attrs["style"],
|
|
59
|
+
and isinstance(data.attrs["style"], str)
|
|
60
60
|
and len(data.attrs["style"]) > 0
|
|
61
61
|
):
|
|
62
62
|
color = data.attrs["style"].split()[-1]
|
lhpapi-1.0.0/.gitignore
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
/dist
|
|
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
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|