flespi-sdk 0.1.1__tar.gz → 0.1.2__tar.gz
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.
- {flespi_sdk-0.1.1 → flespi_sdk-0.1.2}/PKG-INFO +2 -1
- {flespi_sdk-0.1.1 → flespi_sdk-0.1.2}/README.md +1 -0
- {flespi_sdk-0.1.1 → flespi_sdk-0.1.2}/pyproject.toml +4 -11
- {flespi_sdk-0.1.1 → flespi_sdk-0.1.2}/src/flespi_sdk/modules/realms/users/user.py +19 -0
- {flespi_sdk-0.1.1 → flespi_sdk-0.1.2}/.gitignore +0 -0
- {flespi_sdk-0.1.1 → flespi_sdk-0.1.2}/.python-version +0 -0
- {flespi_sdk-0.1.1 → flespi_sdk-0.1.2}/src/flespi_sdk/__init__.py +0 -0
- {flespi_sdk-0.1.1 → flespi_sdk-0.1.2}/src/flespi_sdk/account.py +0 -0
- {flespi_sdk-0.1.1 → flespi_sdk-0.1.2}/src/flespi_sdk/cli.py +0 -0
- {flespi_sdk-0.1.1 → flespi_sdk-0.1.2}/src/flespi_sdk/modules/__init__.py +0 -0
- {flespi_sdk-0.1.1 → flespi_sdk-0.1.2}/src/flespi_sdk/modules/flespi_session.py +0 -0
- {flespi_sdk-0.1.1 → flespi_sdk-0.1.2}/src/flespi_sdk/modules/item_with_metadata.py +0 -0
- {flespi_sdk-0.1.1 → flespi_sdk-0.1.2}/src/flespi_sdk/modules/items_container.py +0 -0
- {flespi_sdk-0.1.1 → flespi_sdk-0.1.2}/src/flespi_sdk/modules/metadata/__init__.py +0 -0
- {flespi_sdk-0.1.1 → flespi_sdk-0.1.2}/src/flespi_sdk/modules/mqtt/__init__.py +0 -0
- {flespi_sdk-0.1.1 → flespi_sdk-0.1.2}/src/flespi_sdk/modules/realms/__init__.py +0 -0
- {flespi_sdk-0.1.1 → flespi_sdk-0.1.2}/src/flespi_sdk/modules/realms/realm.py +0 -0
- {flespi_sdk-0.1.1 → flespi_sdk-0.1.2}/src/flespi_sdk/modules/realms/users/__init__.py +0 -0
- {flespi_sdk-0.1.1 → flespi_sdk-0.1.2}/src/flespi_sdk/modules/subaccounts/__init__.py +0 -0
- {flespi_sdk-0.1.1 → flespi_sdk-0.1.2}/uv.lock +0 -0
@@ -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
|
```
|
@@ -1,22 +1,15 @@
|
|
1
1
|
[project]
|
2
2
|
name = "flespi-sdk"
|
3
|
-
version = "0.1.
|
3
|
+
version = "0.1.2"
|
4
4
|
description = "Add your description here"
|
5
5
|
readme = "README.md"
|
6
|
-
authors = [
|
7
|
-
{ name = "Sergey Shevchik", email = "sergey.shevchik@gmail.com" }
|
8
|
-
]
|
6
|
+
authors = [{ name = "Sergey Shevchik", email = "sergey.shevchik@gmail.com" }]
|
9
7
|
requires-python = ">=3.11"
|
10
|
-
dependencies = [
|
11
|
-
"aiohttp>=3.11.15",
|
12
|
-
]
|
8
|
+
dependencies = ["aiohttp>=3.11.15"]
|
13
9
|
|
14
10
|
[build-system]
|
15
11
|
requires = ["hatchling"]
|
16
12
|
build-backend = "hatchling.build"
|
17
13
|
|
18
14
|
[dependency-groups]
|
19
|
-
dev = [
|
20
|
-
"mypy>=1.15.0",
|
21
|
-
"ruff>=0.11.2",
|
22
|
-
]
|
15
|
+
dev = ["mypy>=1.15.0", "ruff>=0.11.2"]
|
@@ -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)
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|