cheshirecat-python-sdk 1.7.10__py3-none-any.whl → 1.7.11__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.
- cheshirecat_python_sdk/endpoints/users.py +14 -1
- cheshirecat_python_sdk/models/api/users.py +2 -1
- {cheshirecat_python_sdk-1.7.10.dist-info → cheshirecat_python_sdk-1.7.11.dist-info}/METADATA +1 -1
- {cheshirecat_python_sdk-1.7.10.dist-info → cheshirecat_python_sdk-1.7.11.dist-info}/RECORD +6 -6
- {cheshirecat_python_sdk-1.7.10.dist-info → cheshirecat_python_sdk-1.7.11.dist-info}/WHEEL +0 -0
- {cheshirecat_python_sdk-1.7.10.dist-info → cheshirecat_python_sdk-1.7.11.dist-info}/licenses/LICENSE +0 -0
|
@@ -11,7 +11,12 @@ class UsersEndpoint(AbstractEndpoint):
|
|
|
11
11
|
self.prefix = "/users"
|
|
12
12
|
|
|
13
13
|
def post_user(
|
|
14
|
-
self,
|
|
14
|
+
self,
|
|
15
|
+
agent_id: str,
|
|
16
|
+
username: str,
|
|
17
|
+
password: str,
|
|
18
|
+
permissions: dict[str, Any] | None = None,
|
|
19
|
+
metadata: dict[str, Any] | None = None,
|
|
15
20
|
) -> UserOutput:
|
|
16
21
|
"""
|
|
17
22
|
This endpoint is used to create a new user in the system. The user is created with the specified username and
|
|
@@ -22,6 +27,7 @@ class UsersEndpoint(AbstractEndpoint):
|
|
|
22
27
|
:param username: The username of the user to create
|
|
23
28
|
:param password: The password of the user to create
|
|
24
29
|
:param permissions: The permissions of the user to create (optional)
|
|
30
|
+
:param metadata: The metadata of the user to create (optional)
|
|
25
31
|
:return UserOutput, the created user
|
|
26
32
|
"""
|
|
27
33
|
payload = {
|
|
@@ -31,6 +37,9 @@ class UsersEndpoint(AbstractEndpoint):
|
|
|
31
37
|
if permissions is not None:
|
|
32
38
|
payload["permissions"] = permissions # type: ignore
|
|
33
39
|
|
|
40
|
+
if metadata is not None:
|
|
41
|
+
payload["metadata"] = metadata # type: ignore
|
|
42
|
+
|
|
34
43
|
return self.post_json(
|
|
35
44
|
self.prefix,
|
|
36
45
|
agent_id,
|
|
@@ -75,6 +84,7 @@ class UsersEndpoint(AbstractEndpoint):
|
|
|
75
84
|
username: str | None = None,
|
|
76
85
|
password: str | None = None,
|
|
77
86
|
permissions: Dict[str, Any] | None = None,
|
|
87
|
+
metadata: Dict[str, Any] | None = None,
|
|
78
88
|
) -> UserOutput:
|
|
79
89
|
"""
|
|
80
90
|
The endpoint is used to update the user in the system. The user is identified by the userId parameter, previously
|
|
@@ -87,6 +97,7 @@ class UsersEndpoint(AbstractEndpoint):
|
|
|
87
97
|
:param username: The new username of the user (optional)
|
|
88
98
|
:param password: The new password of the user (optional)
|
|
89
99
|
:param permissions: The new permissions of the user (optional)
|
|
100
|
+
:param metadata: The new metadata of the user (optional)
|
|
90
101
|
:return UserOutput, the updated user
|
|
91
102
|
"""
|
|
92
103
|
payload = {}
|
|
@@ -96,6 +107,8 @@ class UsersEndpoint(AbstractEndpoint):
|
|
|
96
107
|
payload["password"] = password
|
|
97
108
|
if permissions is not None:
|
|
98
109
|
payload["permissions"] = permissions
|
|
110
|
+
if metadata is not None:
|
|
111
|
+
payload["metadata"] = metadata
|
|
99
112
|
|
|
100
113
|
return self.put(self.format_url(user_id), agent_id, output_class=UserOutput, payload=payload)
|
|
101
114
|
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
from typing import Dict, List
|
|
1
|
+
from typing import Dict, List, Any
|
|
2
2
|
from pydantic import BaseModel
|
|
3
3
|
|
|
4
4
|
|
|
5
5
|
class UserOutput(BaseModel):
|
|
6
6
|
username: str
|
|
7
7
|
permissions: Dict[str, List[str]]
|
|
8
|
+
metadata: Dict[str, Any] | None = None
|
|
8
9
|
id: str
|
|
9
10
|
created_at: float | None = None
|
|
10
11
|
updated_at: float | None = None
|
{cheshirecat_python_sdk-1.7.10.dist-info → cheshirecat_python_sdk-1.7.11.dist-info}/METADATA
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: cheshirecat-python-sdk
|
|
3
|
-
Version: 1.7.
|
|
3
|
+
Version: 1.7.11
|
|
4
4
|
Summary: Python SDK for the Cloud-ready fork of the Cheshire Cat
|
|
5
5
|
Project-URL: Repository, https://github.com/matteocacciola/cheshirecat-python-sdk
|
|
6
6
|
Project-URL: Documentation, https://github.com/matteocacciola/cheshirecat-python-sdk#README
|
|
@@ -27,7 +27,7 @@ cheshirecat_python_sdk/endpoints/memory.py,sha256=dEnQ2Hb_VG907p7T9oQgPCWWFHAUwk
|
|
|
27
27
|
cheshirecat_python_sdk/endpoints/message.py,sha256=QTUSUJcj52VhfnX9hdjsD2aLeFC43O4eU8ld5lRvITU,2607
|
|
28
28
|
cheshirecat_python_sdk/endpoints/plugins.py,sha256=FasjwNY2UVv7zfg9lvXEj2ATefPDOPQpJXzQ2BbQIYI,3474
|
|
29
29
|
cheshirecat_python_sdk/endpoints/rabbit_hole.py,sha256=DH5KGpk0Ur8RPi1fZIO9D925mc2D0GHQpsOeIKIa1G0,7213
|
|
30
|
-
cheshirecat_python_sdk/endpoints/users.py,sha256=
|
|
30
|
+
cheshirecat_python_sdk/endpoints/users.py,sha256=ySpFi9ILyoT44fnAz8p4LSGTaEAMWv3RBWq72Hv73mI,5803
|
|
31
31
|
cheshirecat_python_sdk/endpoints/utils.py,sha256=yKGrFRpu6ItLnBEuc98093LbXqGYaGdgCLiWuLQJVno,2551
|
|
32
32
|
cheshirecat_python_sdk/endpoints/vector_database.py,sha256=Xu6zcopjZgcFVVmyN547piiqFcaTUtF35X0QxQHycXQ,2149
|
|
33
33
|
cheshirecat_python_sdk/models/dtos.py,sha256=yK6CfCGdwLvZtYFPoImDEgpV5eyHB2iwji2t6dh6gxc,668
|
|
@@ -40,10 +40,10 @@ cheshirecat_python_sdk/models/api/messages.py,sha256=PDojYuXUDXSek8nkg8QKoVdAJ2N
|
|
|
40
40
|
cheshirecat_python_sdk/models/api/plugins.py,sha256=uX8SYbcTxQSxv1IaVChEBd3rr6kc83rwq3IILnmq5EE,1996
|
|
41
41
|
cheshirecat_python_sdk/models/api/rabbit_holes.py,sha256=01FcPSIG6nq9WJhL_rQopLMSD81CU9lfP-t0xtf35Gw,285
|
|
42
42
|
cheshirecat_python_sdk/models/api/tokens.py,sha256=GavSaCq0-SRWjvLtDgrYBOdUELd7VoVXlykmIBT23ds,455
|
|
43
|
-
cheshirecat_python_sdk/models/api/users.py,sha256=
|
|
43
|
+
cheshirecat_python_sdk/models/api/users.py,sha256=_T3-8hfmlZK9cZcqBTbNMYS74yEnDrRACRQn9PNCEiQ,280
|
|
44
44
|
cheshirecat_python_sdk/models/api/nested/memories.py,sha256=ddGDsmZa2refElM0sGz9QfKHGk50wsTpkwN5qDC5bF4,946
|
|
45
45
|
cheshirecat_python_sdk/models/api/nested/plugins.py,sha256=7vrwgXh0csaUn11YKY_OWnGEnD8Fu_ewKxt024VOBEs,738
|
|
46
|
-
cheshirecat_python_sdk-1.7.
|
|
47
|
-
cheshirecat_python_sdk-1.7.
|
|
48
|
-
cheshirecat_python_sdk-1.7.
|
|
49
|
-
cheshirecat_python_sdk-1.7.
|
|
46
|
+
cheshirecat_python_sdk-1.7.11.dist-info/METADATA,sha256=ZOzFwNZ8wapzlOX2WbTcV62MbvJuVP8XdpHZePY6Lrk,44137
|
|
47
|
+
cheshirecat_python_sdk-1.7.11.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
|
|
48
|
+
cheshirecat_python_sdk-1.7.11.dist-info/licenses/LICENSE,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
|
|
49
|
+
cheshirecat_python_sdk-1.7.11.dist-info/RECORD,,
|
|
File without changes
|
{cheshirecat_python_sdk-1.7.10.dist-info → cheshirecat_python_sdk-1.7.11.dist-info}/licenses/LICENSE
RENAMED
|
File without changes
|