Users
Methods on this page are called as client.users.<method>(...) where client is either a synchronous Goodmem or asynchronous AsyncGoodmem instance initialized below:
from goodmem import Goodmem
client = Goodmem(base_url='http://localhost:8080', api_key='gm_...')from goodmem import AsyncGoodmem
client = AsyncGoodmem(base_url='http://localhost:8080', api_key='gm_...')Get a user by ID
Retrieves a specific user by ID or email. Exactly one of id or email must be provided. The SDK automatically routes to the correct REST endpoint.
- email (
str, optional) — The user's email address. Mutually exclusive withid— exactly one must be provided. - id (
str, optional) — The user's UUID. Mutually exclusive withemail— exactly one must be provided.
UserResponse — Returns the user profile.
user = client.users.get(id="your-user-id")
print(user.email)user = client.users.get(email="alice@example.com")
print(user.user_id)Get current user profile
Retrieves the authenticated user's profile information including email, display name, and creation time. This endpoint does not require any parameters as it automatically returns the caller's information.
UserResponse — Returns the user profile.
user = client.users.me()
print(user.email)Async usage: client.users exposes the same methods on AsyncGoodmem; use await / async for as needed.
Data Models
All data models are pydantic v2 models. Fields are shown with their Python attribute names; JSON responses use camelCase aliases (e.g., owner_id → ownerId).
UserResponse
User information response
- user_id (
str) — The UUID of the user - email (
str) — The user's email address - display_name (
str) — The user's display name - username (
str, optional) — The user's username (optional) - created_at (
int) — Timestamp when the user was created (milliseconds since epoch) - updated_at (
int) — Timestamp when the user was last updated (milliseconds since epoch)