weheat 2024.9.4rc1__py3-none-any.whl → 2024.9.4rc2__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,18 @@
1
+ from weheat.configuration import Configuration
2
+ from weheat.api_client import ApiClient
3
+ from weheat.api.user_api import UserApi
4
+
5
+
6
+ def get_user_id_from_token(api_url: str, access_token: str):
7
+ """ Get the user id from the current logged-in user. """
8
+ try:
9
+ config = Configuration(host=api_url, access_token=access_token)
10
+
11
+ with ApiClient(configuration=config) as client:
12
+ response = UserApi(
13
+ client
14
+ ).api_v1_users_me_get_with_http_info()
15
+ if response.status_code == 200:
16
+ return response.data.id
17
+ except Exception as e:
18
+ raise e
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: weheat
3
- Version: 2024.9.4rc1
3
+ Version: 2024.9.4rc2
4
4
  Summary: Weheat Backend client
5
5
  Home-page: https://github.com/wefabricate/wh-python
6
6
  Author: Jesper Raemaekers
@@ -9,6 +9,7 @@ weheat/abstractions/__init__.py,sha256=cRdA_kyTIooo39I13_mqShSfZMqdzNGHbmrnITqgx
9
9
  weheat/abstractions/auth.py,sha256=VCAxJ4OIj7bsYttqJl5-juU0VUlSd3xPu7kUjtHZr3U,979
10
10
  weheat/abstractions/discovery.py,sha256=0HEXdtIuw3FIATUwX0xpeUVRnk8i-HRL21pE6b1mej0,1679
11
11
  weheat/abstractions/heat_pump.py,sha256=kzi6B6oQ8hFYzxMBZqVwbFRY16vR9OFnlWPErBQ_8uA,4649
12
+ weheat/abstractions/user.py,sha256=9p5GZft1Q4qy1dF-6ZkGe_dZYLHvRvRBQhtzVoRjDVA,621
12
13
  weheat/api/__init__.py,sha256=DQnnRs5Z29Nf5sGdFd3f96xM6p_FMym-_-dvQC2VzdU,243
13
14
  weheat/api/energy_log_api.py,sha256=yIIqd-C_xHSM_1eNoj2i04IDkJkzU0-a9iFGDSd2zLo,11374
14
15
  weheat/api/heat_pump_api.py,sha256=FAf7jxosIAginCom-aUuFdj7jZupv8134OI6rpkdK80,24368
@@ -28,8 +29,8 @@ weheat/models/read_all_heat_pump_dto.py,sha256=PDaWb-2qSzAnMoIsNceHavT1ybIZa3-lv
28
29
  weheat/models/read_heat_pump_dto.py,sha256=ufDbcHxtB8o2jmk00bMP_xol3uCdoTOqiHS6UUzRic4,4514
29
30
  weheat/models/read_user_dto.py,sha256=J1YlL-WsXArbirllI1fHZrguKy5Wv35NIck59ICBSGg,3465
30
31
  weheat/models/role.py,sha256=eF6nawkz8mmCGQEmJx26Y2MPFmlKdpOOtJ2Q70b-Qtc,938
31
- weheat-2024.9.4rc1.dist-info/LICENSE,sha256=rWmFUq0uth2jpet-RQ2QPd2VhZkcPSUs6Dxfmbqkbis,1068
32
- weheat-2024.9.4rc1.dist-info/METADATA,sha256=k8icKT87_OtUV9nGLGX1_Mso9VLtejB3qxsA0YbfAbs,3903
33
- weheat-2024.9.4rc1.dist-info/WHEEL,sha256=uCRv0ZEik_232NlR4YDw4Pv3Ajt5bKvMH13NUU7hFuI,91
34
- weheat-2024.9.4rc1.dist-info/top_level.txt,sha256=hLzdyvGZ9rs4AqK7U48mdHx_-FcP5sDuTSleDUvGAZw,7
35
- weheat-2024.9.4rc1.dist-info/RECORD,,
32
+ weheat-2024.9.4rc2.dist-info/LICENSE,sha256=rWmFUq0uth2jpet-RQ2QPd2VhZkcPSUs6Dxfmbqkbis,1068
33
+ weheat-2024.9.4rc2.dist-info/METADATA,sha256=-jCE8eL1LiKb158kj2xqkwpUCBZcpsdH_M29XFaILHc,3903
34
+ weheat-2024.9.4rc2.dist-info/WHEEL,sha256=uCRv0ZEik_232NlR4YDw4Pv3Ajt5bKvMH13NUU7hFuI,91
35
+ weheat-2024.9.4rc2.dist-info/top_level.txt,sha256=hLzdyvGZ9rs4AqK7U48mdHx_-FcP5sDuTSleDUvGAZw,7
36
+ weheat-2024.9.4rc2.dist-info/RECORD,,