-
Notifications
You must be signed in to change notification settings - Fork 208
“add_user” and “update_user” handle additional data differently #155
Copy link
Copy link
Open
Description
add an user with additional data:
from dataclasses import asdict
import json
uid = client.add_user({"name": "Gustavo"})
u = client.get_user(uid)
print(json.dumps(asdict(u), indent=2)){
"user_id": "9c805721-5053-485d-81c8-c058617e2b09",
"project_client": {
"api_key": "secret",
"api_version": "api/v1",
"project_url": "http://host.docker.internal:8019/"
},
"fields": {
"data": {
"name": "Gustavo"
},
"id": null,
"created_at": "2026-02-12T07:22:12.732569Z",
"updated_at": "2026-02-12T07:22:12.732569Z"
}
}update with additional data:
client.update_user(uid, {"ANY": "NEW_DATA"})
u = client.get_user(uid)
print(json.dumps(asdict(u), indent=2)){
"user_id": "9c805721-5053-485d-81c8-c058617e2b09",
"project_client": {
"api_key": "secret",
"api_version": "api/v1",
"project_url": "http://host.docker.internal:8019/"
},
"fields": {
"data": {
"data": {
"ANY": "NEW_DATA"
}
},
"id": null,
"created_at": "2026-02-12T07:22:12.732569Z",
"updated_at": "2026-02-12T07:23:01.094241Z"
}
}Memobase server: 0.0.40
Memobase Python SDK: memobase-0.0.27
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels