weheat 2024.11.1__py3-none-any.whl → 2025.11.24rc1__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.
- weheat/__init__.py +6 -2
- weheat/abstractions/__init__.py +1 -1
- weheat/abstractions/discovery.py +11 -7
- weheat/abstractions/heat_pump.py +223 -81
- weheat/abstractions/user.py +16 -11
- weheat/api/__init__.py +1 -0
- weheat/api/energy_log_api.py +615 -127
- weheat/api/heat_pump_api.py +580 -374
- weheat/api/heat_pump_log_api.py +884 -360
- weheat/api/user_api.py +260 -115
- weheat/api_client.py +238 -265
- weheat/api_response.py +11 -15
- weheat/configuration.py +14 -9
- weheat/exceptions.py +59 -25
- weheat/models/__init__.py +8 -0
- weheat/models/boiler_type.py +8 -3
- weheat/models/device_state.py +9 -5
- weheat/models/dhw_type.py +8 -3
- weheat/models/energy_view_dto.py +87 -65
- weheat/models/heat_pump_log_view_dto.py +1394 -559
- weheat/models/heat_pump_model.py +8 -3
- weheat/models/heat_pump_status_enum.py +9 -4
- weheat/models/pagination_metadata.py +95 -0
- weheat/models/raw_heat_pump_log_dto.py +438 -375
- weheat/models/raw_heatpump_log_and_is_online_dto.py +578 -0
- weheat/models/read_all_heat_pump_dto.py +69 -53
- weheat/models/read_all_heat_pump_dto_paged_response.py +107 -0
- weheat/models/read_heat_pump_dto.py +64 -48
- weheat/models/read_user_dto.py +55 -37
- weheat/models/read_user_me_dto.py +124 -0
- weheat/models/role.py +10 -4
- weheat/models/total_energy_aggregate.py +111 -0
- weheat/rest.py +152 -259
- weheat-2025.11.24rc1.dist-info/METADATA +104 -0
- weheat-2025.11.24rc1.dist-info/RECORD +39 -0
- {weheat-2024.11.1.dist-info → weheat-2025.11.24rc1.dist-info}/WHEEL +1 -1
- weheat/abstractions/auth.py +0 -34
- weheat/models/heat_pump_type.py +0 -42
- weheat-2024.11.1.dist-info/METADATA +0 -107
- weheat-2024.11.1.dist-info/RECORD +0 -36
- {weheat-2024.11.1.dist-info → weheat-2025.11.24rc1.dist-info/licenses}/LICENSE +0 -0
- {weheat-2024.11.1.dist-info → weheat-2025.11.24rc1.dist-info}/top_level.txt +0 -0
weheat/models/heat_pump_type.py
DELETED
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
# coding: utf-8
|
|
2
|
-
|
|
3
|
-
"""
|
|
4
|
-
Weheat Backend
|
|
5
|
-
|
|
6
|
-
This is the backend for the Weheat project
|
|
7
|
-
|
|
8
|
-
The version of the OpenAPI document: v1
|
|
9
|
-
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
10
|
-
|
|
11
|
-
Do not edit the class manually.
|
|
12
|
-
""" # noqa: E501
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
import json
|
|
16
|
-
import pprint
|
|
17
|
-
import re # noqa: F401
|
|
18
|
-
from aenum import Enum, no_arg
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
class HeatPumpType(int, Enum):
|
|
25
|
-
"""
|
|
26
|
-
LEGACY TYPE, Obsolete please do not use HeatPumpType, new properties split up into HeatPumpModel, DhwType and BoilerType
|
|
27
|
-
"""
|
|
28
|
-
|
|
29
|
-
"""
|
|
30
|
-
allowed enum values
|
|
31
|
-
"""
|
|
32
|
-
NUMBER_0 = 0
|
|
33
|
-
NUMBER_1 = 1
|
|
34
|
-
NUMBER_2 = 2
|
|
35
|
-
NUMBER_3 = 3
|
|
36
|
-
|
|
37
|
-
@classmethod
|
|
38
|
-
def from_json(cls, json_str: str) -> HeatPumpType:
|
|
39
|
-
"""Create an instance of HeatPumpType from a JSON string"""
|
|
40
|
-
return HeatPumpType(json.loads(json_str))
|
|
41
|
-
|
|
42
|
-
|
|
@@ -1,107 +0,0 @@
|
|
|
1
|
-
Metadata-Version: 2.1
|
|
2
|
-
Name: weheat
|
|
3
|
-
Version: 2024.11.1
|
|
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 <2,>=1.10.5
|
|
15
|
-
Requires-Dist: aenum
|
|
16
|
-
|
|
17
|
-
# Weheat backend client
|
|
18
|
-
|
|
19
|
-
This is a client for the Weheat backend. It is automatically generated from the OpenAPI specification.
|
|
20
|
-
|
|
21
|
-
## Requirements.
|
|
22
|
-
|
|
23
|
-
Python 3.7+
|
|
24
|
-
|
|
25
|
-
## Installation & Usage
|
|
26
|
-
|
|
27
|
-
You can install directly using:
|
|
28
|
-
|
|
29
|
-
```sh
|
|
30
|
-
pip install weheat
|
|
31
|
-
```
|
|
32
|
-
|
|
33
|
-
Then import the package:
|
|
34
|
-
|
|
35
|
-
```python
|
|
36
|
-
import weheat
|
|
37
|
-
```
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
## Getting Started
|
|
42
|
-
|
|
43
|
-
After installation, you can now use the client to interact with the Weheat backend.
|
|
44
|
-
|
|
45
|
-
```python
|
|
46
|
-
import datetime
|
|
47
|
-
from keycloak import KeycloakOpenID # install with pip install python-keycloak
|
|
48
|
-
from weheat import ApiClient, Configuration, HeatPumpApi, HeatPumpLogApi, EnergyLogApi
|
|
49
|
-
|
|
50
|
-
# input your information here
|
|
51
|
-
auth_url = 'https://auth.weheat.nl/auth/'
|
|
52
|
-
api_url = 'https://api.weheat.nl'
|
|
53
|
-
realm_name = 'Weheat'
|
|
54
|
-
my_client_id = 'WeheatCommunityAPI' # client ID and secret provided by Weheat
|
|
55
|
-
my_client_secret = ''
|
|
56
|
-
username = '' # username and password used for the online portal
|
|
57
|
-
password = ''
|
|
58
|
-
my_heat_pump_id = '' # your heat pump UUID
|
|
59
|
-
|
|
60
|
-
# Get the access token from keycloak
|
|
61
|
-
keycloak_open_id = KeycloakOpenID(server_url=auth_url,
|
|
62
|
-
client_id=my_client_id,
|
|
63
|
-
realm_name=realm_name,
|
|
64
|
-
client_secret_key=my_client_secret)
|
|
65
|
-
|
|
66
|
-
token_response = keycloak_open_id.token(username, password)
|
|
67
|
-
keycloak_open_id.logout(token_response['refresh_token'])
|
|
68
|
-
|
|
69
|
-
# Create the cinfiguration object
|
|
70
|
-
config = Configuration(host=api_url, access_token=token_response['access_token'])
|
|
71
|
-
|
|
72
|
-
# with the client the APIs can be accessed
|
|
73
|
-
with ApiClient(configuration=config) as client:
|
|
74
|
-
# Getting all heat pumps that the user has access to
|
|
75
|
-
response = HeatPumpApi(client).api_v1_heat_pumps_get_with_http_info()
|
|
76
|
-
|
|
77
|
-
if response.status_code == 200:
|
|
78
|
-
print(f'My heat pump: {response.data}')
|
|
79
|
-
|
|
80
|
-
# Getting the latest log of the heat pump
|
|
81
|
-
response = HeatPumpLogApi(client).api_v1_heat_pumps_heat_pump_id_logs_latest_get_with_http_info(
|
|
82
|
-
heat_pump_id=my_heat_pump_id)
|
|
83
|
-
|
|
84
|
-
if response.status_code == 200:
|
|
85
|
-
print(f'My heat pump logs: {response.data}')
|
|
86
|
-
|
|
87
|
-
# Getting the energy logs of the heat pump in a specific period
|
|
88
|
-
# interval can be "Minute", "FiveMinute", "FifteenMinute", "Hour", "Day", "Week", "Month", "Year"
|
|
89
|
-
response = EnergyLogApi(client).api_v1_energy_logs_heat_pump_id_get_with_http_info(heat_pump_id=my_heat_pump_id,
|
|
90
|
-
start_time=datetime.datetime(
|
|
91
|
-
2024, 6,
|
|
92
|
-
22, 0, 0,
|
|
93
|
-
0),
|
|
94
|
-
end_time=datetime.datetime(2024,
|
|
95
|
-
6, 22,
|
|
96
|
-
15, 0,
|
|
97
|
-
0),
|
|
98
|
-
interval='Hour')
|
|
99
|
-
|
|
100
|
-
if response.status_code == 200:
|
|
101
|
-
print(f'My energy logs: {response.data}')
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
```
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
@@ -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=uCehWdXXDnAO2HAHGKe0SgpQ_mJiGDbcu-BHDF3n_IM,852
|
|
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=o0w4lxMPP-vfKrfsrH3-W_1Cxmk9u-hbywibY_zZs9w,2274
|
|
11
|
-
weheat/abstractions/heat_pump.py,sha256=CysEH7Z5u37SFuZPKZSnifnxeoiwVuMCyOkswFnwbUw,9706
|
|
12
|
-
weheat/abstractions/user.py,sha256=n1gmPaLKXmRjF1jDuMQ0951RkbBKm-Cx3cgUU2nOA9U,648
|
|
13
|
-
weheat/api/__init__.py,sha256=DQnnRs5Z29Nf5sGdFd3f96xM6p_FMym-_-dvQC2VzdU,243
|
|
14
|
-
weheat/api/energy_log_api.py,sha256=yIIqd-C_xHSM_1eNoj2i04IDkJkzU0-a9iFGDSd2zLo,11374
|
|
15
|
-
weheat/api/heat_pump_api.py,sha256=FAf7jxosIAginCom-aUuFdj7jZupv8134OI6rpkdK80,24368
|
|
16
|
-
weheat/api/heat_pump_log_api.py,sha256=Xt4pkXOT1x7dsJse00iXpCMQTDuLzhQrMgL_XK3DzDo,28602
|
|
17
|
-
weheat/api/user_api.py,sha256=OHRj6Pur5oLxmC4lkcU-pl2o-XWFhasJbMvoXSrDqqg,7766
|
|
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=jLk6W-pXiBiHAa98G0h8Df-WZbGN_Zh19OoSF09NC5k,8747
|
|
23
|
-
weheat/models/heat_pump_log_view_dto.py,sha256=spe_tG39NM_FzFEvhBk4Gad0Er-Xac5UT9_icx2EagU,63788
|
|
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=vNn1u8_jYAIV9miBK3Qvq0j-U5OYv56dRU2085fLvcI,34385
|
|
28
|
-
weheat/models/read_all_heat_pump_dto.py,sha256=PDaWb-2qSzAnMoIsNceHavT1ybIZa3-lva3zJZA2BzU,5088
|
|
29
|
-
weheat/models/read_heat_pump_dto.py,sha256=ufDbcHxtB8o2jmk00bMP_xol3uCdoTOqiHS6UUzRic4,4514
|
|
30
|
-
weheat/models/read_user_dto.py,sha256=J1YlL-WsXArbirllI1fHZrguKy5Wv35NIck59ICBSGg,3465
|
|
31
|
-
weheat/models/role.py,sha256=eF6nawkz8mmCGQEmJx26Y2MPFmlKdpOOtJ2Q70b-Qtc,938
|
|
32
|
-
weheat-2024.11.1.dist-info/LICENSE,sha256=rWmFUq0uth2jpet-RQ2QPd2VhZkcPSUs6Dxfmbqkbis,1068
|
|
33
|
-
weheat-2024.11.1.dist-info/METADATA,sha256=62ag45Pz7lgvMzy4RbwgZrJNvG26ZfpSaGGscOlEUAo,3901
|
|
34
|
-
weheat-2024.11.1.dist-info/WHEEL,sha256=P9jw-gEje8ByB7_hXoICnHtVCrEwMQh-630tKvQWehc,91
|
|
35
|
-
weheat-2024.11.1.dist-info/top_level.txt,sha256=hLzdyvGZ9rs4AqK7U48mdHx_-FcP5sDuTSleDUvGAZw,7
|
|
36
|
-
weheat-2024.11.1.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|