weheat 2025.2.13__py3-none-any.whl → 2025.2.22__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/exceptions.py CHANGED
@@ -105,9 +105,9 @@ class ApiKeyError(OpenApiException, KeyError):
105
105
  class ApiException(OpenApiException):
106
106
 
107
107
  def __init__(
108
- self,
109
- status=None,
110
- reason=None,
108
+ self,
109
+ status=None,
110
+ reason=None,
111
111
  http_resp=None,
112
112
  *,
113
113
  body: Optional[str] = None,
@@ -133,10 +133,10 @@ class ApiException(OpenApiException):
133
133
 
134
134
  @classmethod
135
135
  def from_response(
136
- cls,
137
- *,
138
- http_resp,
139
- body: Optional[str],
136
+ cls,
137
+ *,
138
+ http_resp,
139
+ body: Optional[str],
140
140
  data: Optional[Any],
141
141
  ) -> Self:
142
142
  if http_resp.status == 400:
@@ -151,6 +151,9 @@ class ApiException(OpenApiException):
151
151
  if http_resp.status == 404:
152
152
  raise NotFoundException(http_resp=http_resp, body=body, data=data)
153
153
 
154
+ if http_resp.status == 429:
155
+ raise TooManyRequestsException(http_resp=http_resp, body=body, data=data)
156
+
154
157
  if 500 <= http_resp.status <= 599:
155
158
  raise ServiceException(http_resp=http_resp, body=body, data=data)
156
159
  raise ApiException(http_resp=http_resp, body=body, data=data)
@@ -189,6 +192,10 @@ class ServiceException(ApiException):
189
192
  pass
190
193
 
191
194
 
195
+ class TooManyRequestsException(ApiException):
196
+ pass
197
+
198
+
192
199
  def render_path(path_to_item):
193
200
  """Returns a string representation of a path"""
194
201
  result = ""
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: weheat
3
- Version: 2025.2.13
3
+ Version: 2025.2.22
4
4
  Summary: Weheat Backend client
5
5
  Home-page: https://github.com/wefabricate/wh-python
6
6
  Author: Jesper Raemaekers
@@ -2,7 +2,7 @@ weheat/__init__.py,sha256=C24j_uAbbyEzqh8DmQyORUrVMdFDlzEv4jGClf4TY34,1765
2
2
  weheat/api_client.py,sha256=Bh5xHchRGCcsHbT3rXrcmhKCMiumi1_2L6n0Q57KODw,24803
3
3
  weheat/api_response.py,sha256=A7O_XgliD6y7jEv82fgIaxR3T8KiwaOqHR6djpZyh_o,674
4
4
  weheat/configuration.py,sha256=8D0zAgx7B6YmVNuyS0AarcCAl5TmKKH655jHqWrvSl0,14531
5
- weheat/exceptions.py,sha256=jZjLtEMBKFpLTdV1GPsbQSPriG1ilgMSodGnhEKlWh4,5913
5
+ weheat/exceptions.py,sha256=Wbn9RsKWzTJHpp5sllYbMjqMWMc8ZyFm_J2sfptVG7g,6086
6
6
  weheat/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
7
7
  weheat/rest.py,sha256=hSt8T6NQfdrgz_7Dxo9U-DO5ZEgUVVG38OUErThWqlU,7086
8
8
  weheat/abstractions/__init__.py,sha256=BbA5WW8RE8vtpK0Dq80ayMILN4m6lmCyIPYzYXy3rTE,177
@@ -29,8 +29,8 @@ weheat/models/read_heat_pump_dto.py,sha256=7jH2MwMVKv_dOoJUUsKE8sTR5mROqco71OzOA
29
29
  weheat/models/read_user_dto.py,sha256=OIsWQZcdByN94ViSv0DjFHORRsMnkQ93jc-gJuudRdg,4018
30
30
  weheat/models/read_user_me_dto.py,sha256=Ger6qKlbZBBvG_4MStl6aEMkrBBJIjQtV6pvK1-lw28,4441
31
31
  weheat/models/role.py,sha256=6KUInAmkhoxEdWxBo9jBHXiy_nqJHrKXVeh8RvQPEYM,1101
32
- weheat-2025.2.13.dist-info/LICENSE,sha256=rWmFUq0uth2jpet-RQ2QPd2VhZkcPSUs6Dxfmbqkbis,1068
33
- weheat-2025.2.13.dist-info/METADATA,sha256=0bLyZ1P3cZCQ18fR8tKgh_FkB1jbaMcZw90bCSkIhPk,3874
34
- weheat-2025.2.13.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
35
- weheat-2025.2.13.dist-info/top_level.txt,sha256=hLzdyvGZ9rs4AqK7U48mdHx_-FcP5sDuTSleDUvGAZw,7
36
- weheat-2025.2.13.dist-info/RECORD,,
32
+ weheat-2025.2.22.dist-info/LICENSE,sha256=rWmFUq0uth2jpet-RQ2QPd2VhZkcPSUs6Dxfmbqkbis,1068
33
+ weheat-2025.2.22.dist-info/METADATA,sha256=5rEYpRYuupCQjYhY8pK7KICJ60DTBrQQL3V2Oi5zBkU,3874
34
+ weheat-2025.2.22.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
35
+ weheat-2025.2.22.dist-info/top_level.txt,sha256=hLzdyvGZ9rs4AqK7U48mdHx_-FcP5sDuTSleDUvGAZw,7
36
+ weheat-2025.2.22.dist-info/RECORD,,