Skip to content

Users

Users resource for account user management.

SyncUsers

SyncUsers(client: SyncClient)

Bases: BaseResource['SyncClient']

Users resource for user account management.

Methods:

  • create

    Create a new user.

  • delete

    Delete a user.

  • get

    Retrieve a user by their ID.

  • get_all

    List all users.

  • patch

    Partially update a user.

  • update

    Update a user (full replacement).

create

create(data: UserCreate) -> str

Create a new user.

Parameters:

Returns:

  • str ( str ) –

    The ID of the newly created user.

delete

delete(user_id: str) -> None

Delete a user.

Parameters:

  • user_id

    (str) –

    The unique identifier of the user to delete.

Returns:

  • None

    None

get

Retrieve a user by their ID.

Parameters:

  • user_id

    (str) –

    The unique identifier of the user.

Returns:

  • UserInstance ( UserInstance ) –

    The user instance matching the given ID.

get_all

get_all() -> list[UserInstance]

List all users.

Returns:

patch

patch(user_id: str, data: UserPatch) -> bool

Partially update a user.

Parameters:

  • user_id

    (str) –

    The unique identifier of the user.

  • data

    (UserPatch) –

    The partial user data to update.

Returns:

  • UserInstance ( bool ) –

    The updated user instance.

update

update(user_id: str, data: UserUpdate) -> bool

Update a user (full replacement).

Parameters:

  • user_id

    (str) –

    The unique identifier of the user.

  • data

    (UserUpdate) –

    The complete user data for replacement.

Returns:

  • UserInstance ( bool ) –

    The updated user instance.

AsyncUsers

AsyncUsers(client: AsyncClient)

Bases: BaseResource['AsyncClient']

Async users resource for user account management.

Methods:

  • create

    Create a new user.

  • delete

    Delete a user.

  • get

    Retrieve a user by their ID.

  • get_all

    List all users.

  • patch

    Partially update a user.

  • update

    Update a user (full replacement).

create async

create(data: UserCreate) -> str

Create a new user.

Parameters:

Returns:

  • str ( str ) –

    The ID of the newly created user.

delete async

delete(user_id: str) -> None

Delete a user.

Parameters:

  • user_id

    (str) –

    The unique identifier of the user to delete.

Returns:

  • None

    None

get async

Retrieve a user by their ID.

Parameters:

  • user_id

    (str) –

    The unique identifier of the user.

Returns:

  • UserInstance ( UserInstance ) –

    The user instance matching the given ID.

get_all async

get_all() -> list[UserInstance]

List all users.

Returns:

patch async

patch(user_id: str, data: UserPatch) -> bool

Partially update a user.

Parameters:

  • user_id

    (str) –

    The unique identifier of the user.

  • data

    (UserPatch) –

    The partial user data to update.

Returns:

  • bool ( bool ) –

    True if the patch was successful, False otherwise.

update async

update(user_id: str, data: UserUpdate) -> bool

Update a user (full replacement).

Parameters:

  • user_id

    (str) –

    The unique identifier of the user.

  • data

    (UserUpdate) –

    The complete user data for replacement.

Returns:

  • bool ( bool ) –

    True if the update was successful, False otherwise.

Request and response types: Users models.