weheat 2025.1.14__py3-none-any.whl → 2025.1.15rc1__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 weheat might be problematic. Click here for more details.
- weheat/__init__.py +7 -2
- weheat/abstractions/discovery.py +2 -4
- weheat/abstractions/heat_pump.py +6 -13
- weheat/abstractions/user.py +3 -5
- weheat/api/__init__.py +1 -0
- weheat/api/energy_log_api.py +306 -132
- weheat/api/heat_pump_api.py +521 -369
- weheat/api/heat_pump_log_api.py +836 -359
- weheat/api/user_api.py +243 -115
- weheat/api_client.py +234 -261
- weheat/api_response.py +10 -18
- weheat/configuration.py +4 -8
- weheat/exceptions.py +59 -25
- weheat/models/__init__.py +6 -0
- weheat/models/boiler_type.py +8 -3
- weheat/models/device_state.py +9 -4
- weheat/models/dhw_type.py +8 -3
- weheat/models/energy_view_dto.py +81 -66
- weheat/models/heat_pump_log_view_dto.py +527 -481
- weheat/models/heat_pump_model.py +8 -3
- weheat/models/heat_pump_status_enum.py +8 -3
- weheat/models/heat_pump_type.py +8 -3
- weheat/models/raw_heat_pump_log_dto.py +353 -315
- weheat/models/read_all_heat_pump_dto.py +64 -48
- weheat/models/read_heat_pump_dto.py +59 -43
- weheat/models/read_user_dto.py +54 -39
- weheat/models/read_user_me_dto.py +124 -0
- weheat/models/role.py +10 -4
- weheat/rest.py +142 -257
- weheat-2025.1.15rc1.dist-info/METADATA +115 -0
- weheat-2025.1.15rc1.dist-info/RECORD +37 -0
- weheat-2025.1.14.dist-info/METADATA +0 -117
- weheat-2025.1.14.dist-info/RECORD +0 -36
- {weheat-2025.1.14.dist-info → weheat-2025.1.15rc1.dist-info}/LICENSE +0 -0
- {weheat-2025.1.14.dist-info → weheat-2025.1.15rc1.dist-info}/WHEEL +0 -0
- {weheat-2025.1.14.dist-info → weheat-2025.1.15rc1.dist-info}/top_level.txt +0 -0
|
@@ -1,117 +0,0 @@
|
|
|
1
|
-
Metadata-Version: 2.2
|
|
2
|
-
Name: weheat
|
|
3
|
-
Version: 2025.1.14
|
|
4
|
-
Summary: Weheat Backend client
|
|
5
|
-
Home-page: https://github.com/wefabricate/wh-python
|
|
6
|
-
Author: Jesper Raemaekers
|
|
7
|
-
Author-email: jesper.raemaekers@wefabricate.com
|
|
8
|
-
License: MIT
|
|
9
|
-
Keywords: OpenAPI,OpenAPI-Generator,Weheat Backend
|
|
10
|
-
Description-Content-Type: text/markdown
|
|
11
|
-
License-File: LICENSE
|
|
12
|
-
Requires-Dist: urllib3<2.1.0,>=1.25.3
|
|
13
|
-
Requires-Dist: python-dateutil
|
|
14
|
-
Requires-Dist: pydantic<3,>=1.10.5
|
|
15
|
-
Requires-Dist: aenum
|
|
16
|
-
Requires-Dist: aiohttp
|
|
17
|
-
Dynamic: author
|
|
18
|
-
Dynamic: author-email
|
|
19
|
-
Dynamic: description
|
|
20
|
-
Dynamic: description-content-type
|
|
21
|
-
Dynamic: home-page
|
|
22
|
-
Dynamic: keywords
|
|
23
|
-
Dynamic: license
|
|
24
|
-
Dynamic: requires-dist
|
|
25
|
-
Dynamic: summary
|
|
26
|
-
|
|
27
|
-
# Weheat backend client
|
|
28
|
-
|
|
29
|
-
This is a client for the Weheat backend. It is automatically generated from the OpenAPI specification.
|
|
30
|
-
|
|
31
|
-
## Requirements.
|
|
32
|
-
|
|
33
|
-
Python 3.7+
|
|
34
|
-
|
|
35
|
-
## Installation & Usage
|
|
36
|
-
|
|
37
|
-
You can install directly using:
|
|
38
|
-
|
|
39
|
-
```sh
|
|
40
|
-
pip install weheat
|
|
41
|
-
```
|
|
42
|
-
|
|
43
|
-
Then import the package:
|
|
44
|
-
|
|
45
|
-
```python
|
|
46
|
-
import weheat
|
|
47
|
-
```
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
## Getting Started
|
|
52
|
-
|
|
53
|
-
After installation, you can now use the client to interact with the Weheat backend.
|
|
54
|
-
|
|
55
|
-
```python
|
|
56
|
-
import datetime
|
|
57
|
-
from keycloak import KeycloakOpenID # install with pip install python-keycloak
|
|
58
|
-
from weheat import ApiClient, Configuration, HeatPumpApi, HeatPumpLogApi, EnergyLogApi
|
|
59
|
-
|
|
60
|
-
# input your information here
|
|
61
|
-
auth_url = 'https://auth.weheat.nl/auth/'
|
|
62
|
-
api_url = 'https://api.weheat.nl'
|
|
63
|
-
realm_name = 'Weheat'
|
|
64
|
-
my_client_id = 'WeheatCommunityAPI' # client ID and secret provided by Weheat
|
|
65
|
-
my_client_secret = ''
|
|
66
|
-
username = '' # username and password used for the online portal
|
|
67
|
-
password = ''
|
|
68
|
-
my_heat_pump_id = '' # your heat pump UUID
|
|
69
|
-
|
|
70
|
-
# Get the access token from keycloak
|
|
71
|
-
keycloak_open_id = KeycloakOpenID(server_url=auth_url,
|
|
72
|
-
client_id=my_client_id,
|
|
73
|
-
realm_name=realm_name,
|
|
74
|
-
client_secret_key=my_client_secret)
|
|
75
|
-
|
|
76
|
-
token_response = keycloak_open_id.token(username, password)
|
|
77
|
-
keycloak_open_id.logout(token_response['refresh_token'])
|
|
78
|
-
|
|
79
|
-
# Create the cinfiguration object
|
|
80
|
-
config = Configuration(host=api_url, access_token=token_response['access_token'])
|
|
81
|
-
|
|
82
|
-
# with the client the APIs can be accessed
|
|
83
|
-
with ApiClient(configuration=config) as client:
|
|
84
|
-
# Getting all heat pumps that the user has access to
|
|
85
|
-
response = HeatPumpApi(client).api_v1_heat_pumps_get_with_http_info()
|
|
86
|
-
|
|
87
|
-
if response.status_code == 200:
|
|
88
|
-
print(f'My heat pump: {response.data}')
|
|
89
|
-
|
|
90
|
-
# Getting the latest log of the heat pump
|
|
91
|
-
response = HeatPumpLogApi(client).api_v1_heat_pumps_heat_pump_id_logs_latest_get_with_http_info(
|
|
92
|
-
heat_pump_id=my_heat_pump_id)
|
|
93
|
-
|
|
94
|
-
if response.status_code == 200:
|
|
95
|
-
print(f'My heat pump logs: {response.data}')
|
|
96
|
-
|
|
97
|
-
# Getting the energy logs of the heat pump in a specific period
|
|
98
|
-
# interval can be "Minute", "FiveMinute", "FifteenMinute", "Hour", "Day", "Week", "Month", "Year"
|
|
99
|
-
response = EnergyLogApi(client).api_v1_energy_logs_heat_pump_id_get_with_http_info(heat_pump_id=my_heat_pump_id,
|
|
100
|
-
start_time=datetime.datetime(
|
|
101
|
-
2024, 6,
|
|
102
|
-
22, 0, 0,
|
|
103
|
-
0),
|
|
104
|
-
end_time=datetime.datetime(2024,
|
|
105
|
-
6, 22,
|
|
106
|
-
15, 0,
|
|
107
|
-
0),
|
|
108
|
-
interval='Hour')
|
|
109
|
-
|
|
110
|
-
if response.status_code == 200:
|
|
111
|
-
print(f'My energy logs: {response.data}')
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
```
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
weheat/__init__.py,sha256=dk7tMBQ9jtkNiWeZW5xWCJoaGIrZVQ-tm5NCZhi2qWU,1440
|
|
2
|
-
weheat/api_client.py,sha256=QNUo_W5MMBajpjN2sWFUIRhOszAE93KECNxdvhVns84,29516
|
|
3
|
-
weheat/api_response.py,sha256=n-M3QVNIkmh-cQazukKeiw_nuvVpWBPAMgr2ryj7vaM,938
|
|
4
|
-
weheat/configuration.py,sha256=FerGmYva4hSzbtPV8hASrSF4Fd1zRIFezPzBhHQHV5c,14562
|
|
5
|
-
weheat/exceptions.py,sha256=P4L9gEdzeIo8YMAh27FeP_-55lEgV1TUFTKq4dmqTVQ,5365
|
|
6
|
-
weheat/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
7
|
-
weheat/rest.py,sha256=hLgJ0CYAR1Dr_LppodDNNC_chj5hEQUmzDmbxvID1ao,13808
|
|
8
|
-
weheat/abstractions/__init__.py,sha256=cRdA_kyTIooo39I13_mqShSfZMqdzNGHbmrnITqgx6A,161
|
|
9
|
-
weheat/abstractions/auth.py,sha256=VCAxJ4OIj7bsYttqJl5-juU0VUlSd3xPu7kUjtHZr3U,979
|
|
10
|
-
weheat/abstractions/discovery.py,sha256=yCO_YtyGvr4rolLAc1KNfhojcFuUrbZdSsYJ8fSD7l4,2352
|
|
11
|
-
weheat/abstractions/heat_pump.py,sha256=fOfj3d2yhmZYkrbvmW5mHmajtarIYuzX48N0fF4xTgg,10014
|
|
12
|
-
weheat/abstractions/user.py,sha256=YLS8C3hTJU5tjVcTw18vVlF6Z0l8E9SX_Gcyo9ylm7g,727
|
|
13
|
-
weheat/api/__init__.py,sha256=DQnnRs5Z29Nf5sGdFd3f96xM6p_FMym-_-dvQC2VzdU,243
|
|
14
|
-
weheat/api/energy_log_api.py,sha256=p1JB9BxWch86c2GAJ6Q0OSNxJjaUY9-uR96cjAUU3Xo,11431
|
|
15
|
-
weheat/api/heat_pump_api.py,sha256=2k0FkxAJbnFJaGx6zYTleaHLgeNBpu9wsyeBDRmIEbs,24436
|
|
16
|
-
weheat/api/heat_pump_log_api.py,sha256=vbc10M4_6jDvFP5Bs-goLtbHjHf4Ve0w3GPOOuIXCiA,28658
|
|
17
|
-
weheat/api/user_api.py,sha256=V2QrdGya7kMJiODqUfz4iB8UquGUajF3O4PGBtIyT9c,7823
|
|
18
|
-
weheat/models/__init__.py,sha256=VJsiySw4ndbqm5WCTxehHg-gmjaB_m2czi2FO-AQZn0,766
|
|
19
|
-
weheat/models/boiler_type.py,sha256=jZF4sXhR7SEhj3bEfvmeH48l1APu_gtSlpQUj45vP7o,906
|
|
20
|
-
weheat/models/device_state.py,sha256=Di_i-8IOWQaK25eYGNsgXv1OZh9s8RAH-6vcdacAObo,1035
|
|
21
|
-
weheat/models/dhw_type.py,sha256=IamPcF02M_BDadVxfD7poh1C00mPXTJ9Wbjwh6TUfV8,817
|
|
22
|
-
weheat/models/energy_view_dto.py,sha256=bNxtr29Yob06ffa-yB8Y8hAeK_pAaPp65Pr7tw3jFN0,8856
|
|
23
|
-
weheat/models/heat_pump_log_view_dto.py,sha256=ryyyK7VaWEANJaMV10kw9m0VDbMI7G4fyI447Wal6o4,63897
|
|
24
|
-
weheat/models/heat_pump_model.py,sha256=8E4VhmRZwLh6I_WfckpWMQ2GbQDZqyszimc58ODOaf0,1079
|
|
25
|
-
weheat/models/heat_pump_status_enum.py,sha256=rv8xkSvnbegS6EQMNL-tayA_-4sr1rIkS6Hoq3yoHCA,1017
|
|
26
|
-
weheat/models/heat_pump_type.py,sha256=Kft4cXvenK27miFDcsBOHv7p2svAW18iptT_GUcXWeU,818
|
|
27
|
-
weheat/models/raw_heat_pump_log_dto.py,sha256=-GG-hVvSRE-iikJ3QpBpWdRWjvh8_Jfz5Vkv1VwIhtQ,34507
|
|
28
|
-
weheat/models/read_all_heat_pump_dto.py,sha256=SSuXCZ6ycQixGE4HX9l7NJD6vEEmupngZGCJZ1qmUMU,5181
|
|
29
|
-
weheat/models/read_heat_pump_dto.py,sha256=ETXsM2imYycxDbk8-6R4_wvR0_LyLgsgNKZO14R2oA8,4607
|
|
30
|
-
weheat/models/read_user_dto.py,sha256=S5UbvBtTGmMybsJMsKznrVGaUuJFRtFbMME8n7assR8,3550
|
|
31
|
-
weheat/models/role.py,sha256=eF6nawkz8mmCGQEmJx26Y2MPFmlKdpOOtJ2Q70b-Qtc,938
|
|
32
|
-
weheat-2025.1.14.dist-info/LICENSE,sha256=rWmFUq0uth2jpet-RQ2QPd2VhZkcPSUs6Dxfmbqkbis,1068
|
|
33
|
-
weheat-2025.1.14.dist-info/METADATA,sha256=yiRkk2YCzbnumyH4aJFSzWZNjTc5knQq-XOoM41hGC0,4109
|
|
34
|
-
weheat-2025.1.14.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
|
|
35
|
-
weheat-2025.1.14.dist-info/top_level.txt,sha256=hLzdyvGZ9rs4AqK7U48mdHx_-FcP5sDuTSleDUvGAZw,7
|
|
36
|
-
weheat-2025.1.14.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|