GoodMem
ReferenceClient SDKsPython

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

users.get(*, email: str = None, id: str = None) -> UserResponse

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.

Parameters
  • email (str, optional) — The user's email address. Mutually exclusive with id — exactly one must be provided.
  • id (str, optional) — The user's UUID. Mutually exclusive with email — exactly one must be provided.
Returns

UserResponse — Returns the user profile.

Examples
Example 1:
user = client.users.get(id="your-user-id")
print(user.email)

Example 2:
user = client.users.get(email="alice@example.com")
print(user.user_id)


Get current user profile

users.me() -> UserResponse

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.

Returns

UserResponse — Returns the user profile.

Example
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_idownerId).

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)