flespi-sdk 0.1.1__py3-none-any.whl → 0.1.2__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.
@@ -23,3 +23,22 @@ class User(ItemWithMetadata):
|
|
23
23
|
session=session,
|
24
24
|
cid=cid,
|
25
25
|
)
|
26
|
+
|
27
|
+
async def update_password(
|
28
|
+
self,
|
29
|
+
password: str,
|
30
|
+
) -> None:
|
31
|
+
"""
|
32
|
+
Updates the password of the user.
|
33
|
+
|
34
|
+
:param password: The new password for the user.
|
35
|
+
"""
|
36
|
+
if len(password) < 16:
|
37
|
+
raise ValueError("Password must be at least 16 characters long")
|
38
|
+
|
39
|
+
async with self.session.put(
|
40
|
+
f"/platform/realms/{self.parent_id}/users/{self.id}",
|
41
|
+
json={"password": password},
|
42
|
+
headers=self.get_headers(),
|
43
|
+
) as response:
|
44
|
+
await self.get_result(response)
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: flespi-sdk
|
3
|
-
Version: 0.1.
|
3
|
+
Version: 0.1.2
|
4
4
|
Summary: Add your description here
|
5
5
|
Author-email: Sergey Shevchik <sergey.shevchik@gmail.com>
|
6
6
|
Requires-Python: >=3.11
|
@@ -84,4 +84,5 @@ await user.metadata.set_value("test-metadata-key", "123")
|
|
84
84
|
print(await user.metadata.get())
|
85
85
|
await user.metadata.delete_value("test-metadata-key")
|
86
86
|
print(await user.metadata.get())
|
87
|
+
await user.update_password("newpassword123456789")
|
87
88
|
```
|
@@ -10,8 +10,8 @@ flespi_sdk/modules/mqtt/__init__.py,sha256=nLUQxrNpJ2E8l-OGyOAE-dfyOpQ4_-bjC-fkU
|
|
10
10
|
flespi_sdk/modules/realms/__init__.py,sha256=U3nT0Zwz7Y6knmEsL3jDqxwRntM3GgmMqJUERCJJsTs,1063
|
11
11
|
flespi_sdk/modules/realms/realm.py,sha256=TxYZpUJfKY3DnlUXzbu2OaY4nlfdA_PkVcW8N5tXNQc,633
|
12
12
|
flespi_sdk/modules/realms/users/__init__.py,sha256=hHv5R_eySJ_ioQIfYjYHbnbcMm1NhSKBKBpsNILHfbE,1798
|
13
|
-
flespi_sdk/modules/realms/users/user.py,sha256=
|
13
|
+
flespi_sdk/modules/realms/users/user.py,sha256=Y6Z3WZuzyl9-IOvKl4_OkBXBT2nIiq8L_dWF6MhD-IY,1249
|
14
14
|
flespi_sdk/modules/subaccounts/__init__.py,sha256=PhS91e9FoV3m6VkfrANoq0_Zf-v139VsShGBXoPaJ-I,1044
|
15
|
-
flespi_sdk-0.1.
|
16
|
-
flespi_sdk-0.1.
|
17
|
-
flespi_sdk-0.1.
|
15
|
+
flespi_sdk-0.1.2.dist-info/METADATA,sha256=Ij9JZs0jpNBmxRDfLLKwCrLJJOraIX_dgLxUZo23t1c,2267
|
16
|
+
flespi_sdk-0.1.2.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
17
|
+
flespi_sdk-0.1.2.dist-info/RECORD,,
|
File without changes
|