weheat 2025.1.14rc1__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.

@@ -0,0 +1,124 @@
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
+ from __future__ import annotations
16
+ import pprint
17
+ import re # noqa: F401
18
+ import json
19
+
20
+ from datetime import datetime
21
+ from typing import Optional
22
+ try:
23
+ from pydantic.v1 import BaseModel, Field, StrictStr, constr
24
+ except ImportError:
25
+ from pydantic import BaseModel, Field, StrictStr, constr
26
+ from weheat.models.boiler_type import BoilerType
27
+ from weheat.models.device_state import DeviceState
28
+ from weheat.models.dhw_type import DhwType
29
+ from weheat.models.heat_pump_model import HeatPumpModel
30
+ from weheat.models.heat_pump_status_enum import HeatPumpStatusEnum
31
+ from weheat.models.heat_pump_type import HeatPumpType
32
+
33
+ class ReadAllHeatPumpDto(BaseModel):
34
+ """
35
+ Heat Pump dto used for the GetAll operation where the firmware version is needed # noqa: E501
36
+ """
37
+ id: StrictStr = Field(..., description="Identifier of the heat pump")
38
+ control_board_id: StrictStr = Field(..., alias="controlBoardId", description="Identifier of the control board that is connected to the heat pump")
39
+ serial_number: constr(strict=True, min_length=1) = Field(..., alias="serialNumber", description="Serial Number of this heat pump")
40
+ part_number: Optional[StrictStr] = Field(None, alias="partNumber", description="Part Number of this heat pump")
41
+ state: DeviceState = Field(...)
42
+ name: Optional[StrictStr] = Field(None, description="Internal nickname of this heat pump")
43
+ model: Optional[HeatPumpModel] = None
44
+ dhw_type: Optional[DhwType] = Field(None, alias="dhwType")
45
+ boiler_type: Optional[BoilerType] = Field(None, alias="boilerType")
46
+ status: Optional[HeatPumpStatusEnum] = None
47
+ type: Optional[HeatPumpType] = None
48
+ commissioned_at: Optional[datetime] = Field(None, alias="commissionedAt", description="Date when the heat pump was last commissioned (decommissioning sets this to null)")
49
+ firmware_version: Optional[StrictStr] = Field(None, alias="firmwareVersion", description="Firmware version of control board connected to heat pump")
50
+ __properties = ["id", "controlBoardId", "serialNumber", "partNumber", "state", "name", "model", "dhwType", "boilerType", "status", "type", "commissionedAt", "firmwareVersion"]
51
+
52
+ class Config:
53
+ """Pydantic configuration"""
54
+ allow_population_by_field_name = True
55
+ validate_assignment = True
56
+
57
+ def to_str(self) -> str:
58
+ """Returns the string representation of the model using alias"""
59
+ return pprint.pformat(self.dict(by_alias=True))
60
+
61
+ def to_json(self) -> str:
62
+ """Returns the JSON representation of the model using alias"""
63
+ return json.dumps(self.to_dict())
64
+
65
+ @classmethod
66
+ def from_json(cls, json_str: str) -> ReadAllHeatPumpDto:
67
+ """Create an instance of ReadAllHeatPumpDto from a JSON string"""
68
+ return cls.from_dict(json.loads(json_str))
69
+
70
+ def to_dict(self):
71
+ """Returns the dictionary representation of the model using alias"""
72
+ _dict = self.dict(by_alias=True,
73
+ exclude={
74
+ },
75
+ exclude_none=True)
76
+ # set to None if part_number (nullable) is None
77
+ # and __fields_set__ contains the field
78
+ if self.part_number is None and "part_number" in self.__fields_set__:
79
+ _dict['partNumber'] = None
80
+
81
+ # set to None if name (nullable) is None
82
+ # and __fields_set__ contains the field
83
+ if self.name is None and "name" in self.__fields_set__:
84
+ _dict['name'] = None
85
+
86
+ # set to None if commissioned_at (nullable) is None
87
+ # and __fields_set__ contains the field
88
+ if self.commissioned_at is None and "commissioned_at" in self.__fields_set__:
89
+ _dict['commissionedAt'] = None
90
+
91
+ # set to None if firmware_version (nullable) is None
92
+ # and __fields_set__ contains the field
93
+ if self.firmware_version is None and "firmware_version" in self.__fields_set__:
94
+ _dict['firmwareVersion'] = None
95
+
96
+ return _dict
97
+
98
+ @classmethod
99
+ def from_dict(cls, obj: dict) -> ReadAllHeatPumpDto:
100
+ """Create an instance of ReadAllHeatPumpDto from a dict"""
101
+ if obj is None:
102
+ return None
103
+
104
+ if not isinstance(obj, dict):
105
+ return ReadAllHeatPumpDto.parse_obj(obj)
106
+
107
+ _obj = ReadAllHeatPumpDto.parse_obj({
108
+ "id": obj.get("id"),
109
+ "control_board_id": obj.get("controlBoardId"),
110
+ "serial_number": obj.get("serialNumber"),
111
+ "part_number": obj.get("partNumber"),
112
+ "state": obj.get("state"),
113
+ "name": obj.get("name"),
114
+ "model": obj.get("model"),
115
+ "dhw_type": obj.get("dhwType"),
116
+ "boiler_type": obj.get("boilerType"),
117
+ "status": obj.get("status"),
118
+ "type": obj.get("type"),
119
+ "commissioned_at": obj.get("commissionedAt"),
120
+ "firmware_version": obj.get("firmwareVersion")
121
+ })
122
+ return _obj
123
+
124
+
@@ -0,0 +1,117 @@
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
+ from __future__ import annotations
16
+ import pprint
17
+ import re # noqa: F401
18
+ import json
19
+
20
+ from datetime import datetime
21
+ from typing import Optional
22
+ try:
23
+ from pydantic.v1 import BaseModel, Field, StrictStr, constr
24
+ except ImportError:
25
+ from pydantic import BaseModel, Field, StrictStr, constr
26
+ from weheat.models.boiler_type import BoilerType
27
+ from weheat.models.device_state import DeviceState
28
+ from weheat.models.dhw_type import DhwType
29
+ from weheat.models.heat_pump_model import HeatPumpModel
30
+ from weheat.models.heat_pump_status_enum import HeatPumpStatusEnum
31
+ from weheat.models.heat_pump_type import HeatPumpType
32
+
33
+ class ReadHeatPumpDto(BaseModel):
34
+ """
35
+ ReadHeatPumpDto
36
+ """
37
+ id: StrictStr = Field(..., description="Identifier of the heat pump")
38
+ control_board_id: StrictStr = Field(..., alias="controlBoardId", description="Identifier of the control board that is connected to the heat pump")
39
+ serial_number: constr(strict=True, min_length=1) = Field(..., alias="serialNumber", description="Serial Number of this heat pump")
40
+ part_number: Optional[StrictStr] = Field(None, alias="partNumber", description="Part Number of this heat pump")
41
+ state: DeviceState = Field(...)
42
+ name: Optional[StrictStr] = Field(None, description="Internal nickname of this heat pump")
43
+ model: Optional[HeatPumpModel] = None
44
+ dhw_type: Optional[DhwType] = Field(None, alias="dhwType")
45
+ boiler_type: Optional[BoilerType] = Field(None, alias="boilerType")
46
+ status: Optional[HeatPumpStatusEnum] = None
47
+ type: Optional[HeatPumpType] = None
48
+ commissioned_at: Optional[datetime] = Field(None, alias="commissionedAt", description="Date when the heat pump was last commissioned (decommissioning sets this to null)")
49
+ __properties = ["id", "controlBoardId", "serialNumber", "partNumber", "state", "name", "model", "dhwType", "boilerType", "status", "type", "commissionedAt"]
50
+
51
+ class Config:
52
+ """Pydantic configuration"""
53
+ allow_population_by_field_name = True
54
+ validate_assignment = True
55
+
56
+ def to_str(self) -> str:
57
+ """Returns the string representation of the model using alias"""
58
+ return pprint.pformat(self.dict(by_alias=True))
59
+
60
+ def to_json(self) -> str:
61
+ """Returns the JSON representation of the model using alias"""
62
+ return json.dumps(self.to_dict())
63
+
64
+ @classmethod
65
+ def from_json(cls, json_str: str) -> ReadHeatPumpDto:
66
+ """Create an instance of ReadHeatPumpDto from a JSON string"""
67
+ return cls.from_dict(json.loads(json_str))
68
+
69
+ def to_dict(self):
70
+ """Returns the dictionary representation of the model using alias"""
71
+ _dict = self.dict(by_alias=True,
72
+ exclude={
73
+ },
74
+ exclude_none=True)
75
+ # set to None if part_number (nullable) is None
76
+ # and __fields_set__ contains the field
77
+ if self.part_number is None and "part_number" in self.__fields_set__:
78
+ _dict['partNumber'] = None
79
+
80
+ # set to None if name (nullable) is None
81
+ # and __fields_set__ contains the field
82
+ if self.name is None and "name" in self.__fields_set__:
83
+ _dict['name'] = None
84
+
85
+ # set to None if commissioned_at (nullable) is None
86
+ # and __fields_set__ contains the field
87
+ if self.commissioned_at is None and "commissioned_at" in self.__fields_set__:
88
+ _dict['commissionedAt'] = None
89
+
90
+ return _dict
91
+
92
+ @classmethod
93
+ def from_dict(cls, obj: dict) -> ReadHeatPumpDto:
94
+ """Create an instance of ReadHeatPumpDto from a dict"""
95
+ if obj is None:
96
+ return None
97
+
98
+ if not isinstance(obj, dict):
99
+ return ReadHeatPumpDto.parse_obj(obj)
100
+
101
+ _obj = ReadHeatPumpDto.parse_obj({
102
+ "id": obj.get("id"),
103
+ "control_board_id": obj.get("controlBoardId"),
104
+ "serial_number": obj.get("serialNumber"),
105
+ "part_number": obj.get("partNumber"),
106
+ "state": obj.get("state"),
107
+ "name": obj.get("name"),
108
+ "model": obj.get("model"),
109
+ "dhw_type": obj.get("dhwType"),
110
+ "boiler_type": obj.get("boilerType"),
111
+ "status": obj.get("status"),
112
+ "type": obj.get("type"),
113
+ "commissioned_at": obj.get("commissionedAt")
114
+ })
115
+ return _obj
116
+
117
+
@@ -0,0 +1,102 @@
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
+ from __future__ import annotations
16
+ import pprint
17
+ import re # noqa: F401
18
+ import json
19
+
20
+ from datetime import datetime
21
+ from typing import Optional
22
+ try:
23
+ from pydantic.v1 import BaseModel, Field, StrictStr
24
+ except ImportError:
25
+ from pydantic import BaseModel, Field, StrictStr
26
+ from weheat.models.role import Role
27
+
28
+ class ReadUserDto(BaseModel):
29
+ """
30
+ ReadUserDto
31
+ """
32
+ id: StrictStr = Field(..., description="Identifier of the user")
33
+ first_name: Optional[StrictStr] = Field(None, alias="firstName", description="First name of the user if available")
34
+ last_name: Optional[StrictStr] = Field(None, alias="lastName", description="Last Name of the user if available")
35
+ role: Role = Field(...)
36
+ email: Optional[StrictStr] = Field(None, description="Email address of the user")
37
+ updated_on: datetime = Field(..., alias="updatedOn", description="Timestamp of the last update to the user entry")
38
+ created_on: datetime = Field(..., alias="createdOn", description="Timestamp of the creation of the user entry")
39
+ __properties = ["id", "firstName", "lastName", "role", "email", "updatedOn", "createdOn"]
40
+
41
+ class Config:
42
+ """Pydantic configuration"""
43
+ allow_population_by_field_name = True
44
+ validate_assignment = True
45
+
46
+ def to_str(self) -> str:
47
+ """Returns the string representation of the model using alias"""
48
+ return pprint.pformat(self.dict(by_alias=True))
49
+
50
+ def to_json(self) -> str:
51
+ """Returns the JSON representation of the model using alias"""
52
+ return json.dumps(self.to_dict())
53
+
54
+ @classmethod
55
+ def from_json(cls, json_str: str) -> ReadUserDto:
56
+ """Create an instance of ReadUserDto from a JSON string"""
57
+ return cls.from_dict(json.loads(json_str))
58
+
59
+ def to_dict(self):
60
+ """Returns the dictionary representation of the model using alias"""
61
+ _dict = self.dict(by_alias=True,
62
+ exclude={
63
+ },
64
+ exclude_none=True)
65
+ # set to None if first_name (nullable) is None
66
+ # and __fields_set__ contains the field
67
+ if self.first_name is None and "first_name" in self.__fields_set__:
68
+ _dict['firstName'] = None
69
+
70
+ # set to None if last_name (nullable) is None
71
+ # and __fields_set__ contains the field
72
+ if self.last_name is None and "last_name" in self.__fields_set__:
73
+ _dict['lastName'] = None
74
+
75
+ # set to None if email (nullable) is None
76
+ # and __fields_set__ contains the field
77
+ if self.email is None and "email" in self.__fields_set__:
78
+ _dict['email'] = None
79
+
80
+ return _dict
81
+
82
+ @classmethod
83
+ def from_dict(cls, obj: dict) -> ReadUserDto:
84
+ """Create an instance of ReadUserDto from a dict"""
85
+ if obj is None:
86
+ return None
87
+
88
+ if not isinstance(obj, dict):
89
+ return ReadUserDto.parse_obj(obj)
90
+
91
+ _obj = ReadUserDto.parse_obj({
92
+ "id": obj.get("id"),
93
+ "first_name": obj.get("firstName"),
94
+ "last_name": obj.get("lastName"),
95
+ "role": obj.get("role"),
96
+ "email": obj.get("email"),
97
+ "updated_on": obj.get("updatedOn"),
98
+ "created_on": obj.get("createdOn")
99
+ })
100
+ return _obj
101
+
102
+
weheat/models/role.py ADDED
@@ -0,0 +1,46 @@
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 Role(int, Enum):
25
+ """
26
+ Roles that can be assigned to a user.\\ Roles enumeration include: - Admin (0), - Support (1), - Logistics (2), - Sales (3), - DataScientist (4), - Production (5), - Installer (6), - Consumer (7)
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
+ NUMBER_4 = 4
37
+ NUMBER_5 = 5
38
+ NUMBER_6 = 6
39
+ NUMBER_7 = 7
40
+
41
+ @classmethod
42
+ def from_json(cls, json_str: str) -> Role:
43
+ """Create an instance of Role from a JSON string"""
44
+ return Role(json.loads(json_str))
45
+
46
+
weheat/py.typed ADDED
File without changes