pykoplenti 1.2.0__py3-none-any.whl → 1.2.1__py3-none-any.whl
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.
Potentially problematic release.
This version of pykoplenti might be problematic. Click here for more details.
- pykoplenti/api.py +6 -5
- pykoplenti/model.py +1 -2
- {pykoplenti-1.2.0.dist-info → pykoplenti-1.2.1.dist-info}/METADATA +7 -4
- pykoplenti-1.2.1.dist-info/RECORD +12 -0
- pykoplenti-1.2.0.dist-info/RECORD +0 -12
- {pykoplenti-1.2.0.dist-info → pykoplenti-1.2.1.dist-info}/LICENSE +0 -0
- {pykoplenti-1.2.0.dist-info → pykoplenti-1.2.1.dist-info}/WHEEL +0 -0
- {pykoplenti-1.2.0.dist-info → pykoplenti-1.2.1.dist-info}/entry_points.txt +0 -0
- {pykoplenti-1.2.0.dist-info → pykoplenti-1.2.1.dist-info}/top_level.txt +0 -0
pykoplenti/api.py
CHANGED
|
@@ -13,14 +13,15 @@ import warnings
|
|
|
13
13
|
|
|
14
14
|
from Crypto.Cipher import AES
|
|
15
15
|
from aiohttp import ClientResponse, ClientSession, ClientTimeout
|
|
16
|
+
from pydantic import parse_obj_as
|
|
16
17
|
from yarl import URL
|
|
17
18
|
|
|
18
19
|
from .model import (
|
|
19
20
|
EventData,
|
|
20
21
|
MeData,
|
|
21
22
|
ModuleData,
|
|
23
|
+
ProcessData,
|
|
22
24
|
ProcessDataCollection,
|
|
23
|
-
ProcessDataListTypeAdapter,
|
|
24
25
|
SettingsData,
|
|
25
26
|
VersionData,
|
|
26
27
|
)
|
|
@@ -522,7 +523,7 @@ class ApiClient(contextlib.AbstractAsyncContextManager):
|
|
|
522
523
|
data_response = await resp.json()
|
|
523
524
|
return {
|
|
524
525
|
data_response[0]["moduleid"]: ProcessDataCollection(
|
|
525
|
-
|
|
526
|
+
parse_obj_as(list[ProcessData], data_response[0]["processdata"])
|
|
526
527
|
)
|
|
527
528
|
}
|
|
528
529
|
|
|
@@ -535,7 +536,7 @@ class ApiClient(contextlib.AbstractAsyncContextManager):
|
|
|
535
536
|
data_response = await resp.json()
|
|
536
537
|
return {
|
|
537
538
|
data_response[0]["moduleid"]: ProcessDataCollection(
|
|
538
|
-
|
|
539
|
+
parse_obj_as(list[ProcessData], data_response[0]["processdata"])
|
|
539
540
|
)
|
|
540
541
|
}
|
|
541
542
|
|
|
@@ -551,7 +552,7 @@ class ApiClient(contextlib.AbstractAsyncContextManager):
|
|
|
551
552
|
data_response = await resp.json()
|
|
552
553
|
return {
|
|
553
554
|
data_response[0]["moduleid"]: ProcessDataCollection(
|
|
554
|
-
|
|
555
|
+
parse_obj_as(list[ProcessData], data_response[0]["processdata"])
|
|
555
556
|
)
|
|
556
557
|
}
|
|
557
558
|
|
|
@@ -573,7 +574,7 @@ class ApiClient(contextlib.AbstractAsyncContextManager):
|
|
|
573
574
|
data_response = await resp.json()
|
|
574
575
|
return {
|
|
575
576
|
x["moduleid"]: ProcessDataCollection(
|
|
576
|
-
|
|
577
|
+
parse_obj_as(List[ProcessData], x["processdata"])
|
|
577
578
|
)
|
|
578
579
|
for x in data_response
|
|
579
580
|
}
|
pykoplenti/model.py
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
from datetime import datetime
|
|
2
2
|
from typing import Iterator, Mapping
|
|
3
3
|
|
|
4
|
-
from pydantic import BaseModel, Field
|
|
4
|
+
from pydantic import BaseModel, Field
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
class MeData(BaseModel):
|
|
@@ -38,7 +38,6 @@ class ProcessData(BaseModel):
|
|
|
38
38
|
unit: str
|
|
39
39
|
value: float
|
|
40
40
|
|
|
41
|
-
ProcessDataListTypeAdapter = TypeAdapter(list[ProcessData])
|
|
42
41
|
|
|
43
42
|
class ProcessDataCollection(Mapping):
|
|
44
43
|
"""Represents a collection of process data value."""
|
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: pykoplenti
|
|
3
|
-
Version: 1.2.
|
|
3
|
+
Version: 1.2.1
|
|
4
4
|
Summary: Python REST-Client for Kostal Plenticore Solar Inverters
|
|
5
5
|
Home-page: https://github.com/stegm/pyclient_koplenti
|
|
6
6
|
Author: @stegm
|
|
7
|
+
Project-URL: repository, https://github.com/stegm/pyclient_koplenti
|
|
8
|
+
Project-URL: changelog, https://github.com/stegm/pykoplenti/blob/master/CHANGELOG.md
|
|
9
|
+
Project-URL: issues, https://github.com/stegm/pykoplenti/issues
|
|
7
10
|
Keywords: rest kostal plenticore solar
|
|
8
11
|
Classifier: Development Status :: 4 - Beta
|
|
9
12
|
Classifier: Environment :: Console
|
|
@@ -15,9 +18,9 @@ Classifier: Programming Language :: Python :: 3.8
|
|
|
15
18
|
Classifier: Topic :: Software Development :: Libraries
|
|
16
19
|
Description-Content-Type: text/markdown
|
|
17
20
|
License-File: LICENSE
|
|
18
|
-
Requires-Dist: aiohttp
|
|
19
|
-
Requires-Dist: pycryptodome
|
|
20
|
-
Requires-Dist: pydantic
|
|
21
|
+
Requires-Dist: aiohttp ~=3.8.5
|
|
22
|
+
Requires-Dist: pycryptodome ~=3.19
|
|
23
|
+
Requires-Dist: pydantic ~=1.10
|
|
21
24
|
Provides-Extra: cli
|
|
22
25
|
Requires-Dist: prompt-toolkit >=3.0 ; extra == 'cli'
|
|
23
26
|
Requires-Dist: click >=7.1 ; extra == 'cli'
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
pykoplenti/__init__.py,sha256=w9ooy6_JaT9lGvMDAaBHyvYu1uTFTkb1g21WRxp3Kzw,756
|
|
2
|
+
pykoplenti/api.py,sha256=gYWWd8yZ9winj7qPt1-rzx4stX_DLPfy5nOduuamtH4,26431
|
|
3
|
+
pykoplenti/cli.py,sha256=LAiQHlSgoJz07kTtFh0bNyahyYz7gCenhRfradex5wE,12972
|
|
4
|
+
pykoplenti/extended.py,sha256=_MCDtP-6BaAiTFqJ44CLK_Ihkh6nCC0vWWv1lsQfEFs,9311
|
|
5
|
+
pykoplenti/model.py,sha256=g-KyYTF1M1p6OAebyA74OAP_-561u6Hylhgy_jnpMto,2266
|
|
6
|
+
pykoplenti/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
7
|
+
pykoplenti-1.2.1.dist-info/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
|
|
8
|
+
pykoplenti-1.2.1.dist-info/METADATA,sha256=ztvYvxRUUOWJYIbUJ4icUf1X14C_55BJMoA6GiN3ABI,5577
|
|
9
|
+
pykoplenti-1.2.1.dist-info/WHEEL,sha256=Xo9-1PvkuimrydujYJAjF7pCkriuXBpUPEjma1nZyJ0,92
|
|
10
|
+
pykoplenti-1.2.1.dist-info/entry_points.txt,sha256=Ix-p1uzKNyOMTK0TOlAC0nsfWS6ATXVuaNDJ5-TwBJw,56
|
|
11
|
+
pykoplenti-1.2.1.dist-info/top_level.txt,sha256=Bi915FGIFYzCujwn5Kwhu3B-sxElgc7gX3gNaYjl4j8,11
|
|
12
|
+
pykoplenti-1.2.1.dist-info/RECORD,,
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
pykoplenti/__init__.py,sha256=w9ooy6_JaT9lGvMDAaBHyvYu1uTFTkb1g21WRxp3Kzw,756
|
|
2
|
-
pykoplenti/api.py,sha256=t8GerMOzbtpQ_C3IV2a3waVKQ3XKnuoLIS5IImRINlc,26456
|
|
3
|
-
pykoplenti/cli.py,sha256=LAiQHlSgoJz07kTtFh0bNyahyYz7gCenhRfradex5wE,12972
|
|
4
|
-
pykoplenti/extended.py,sha256=_MCDtP-6BaAiTFqJ44CLK_Ihkh6nCC0vWWv1lsQfEFs,9311
|
|
5
|
-
pykoplenti/model.py,sha256=-l6kdz9XGsc-feA-dlXGF4-1-nfv9hr-7nMbMGonh7A,2339
|
|
6
|
-
pykoplenti/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
7
|
-
pykoplenti-1.2.0.dist-info/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
|
|
8
|
-
pykoplenti-1.2.0.dist-info/METADATA,sha256=wcyMYrGyLoWiUWqYa3l5He5x0y_K_ZlevhRM9rOCKP8,5361
|
|
9
|
-
pykoplenti-1.2.0.dist-info/WHEEL,sha256=Xo9-1PvkuimrydujYJAjF7pCkriuXBpUPEjma1nZyJ0,92
|
|
10
|
-
pykoplenti-1.2.0.dist-info/entry_points.txt,sha256=Ix-p1uzKNyOMTK0TOlAC0nsfWS6ATXVuaNDJ5-TwBJw,56
|
|
11
|
-
pykoplenti-1.2.0.dist-info/top_level.txt,sha256=Bi915FGIFYzCujwn5Kwhu3B-sxElgc7gX3gNaYjl4j8,11
|
|
12
|
-
pykoplenti-1.2.0.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|