Users
- class cherryservers_sdk_python.users.User(client: C, model: T)[source]
Cherry Servers user resource.
This class represents an existing Cherry Servers resource and should only be initialized by
UserClient.
- class cherryservers_sdk_python.users.UserModel(*, id: int, first_name: str | None = None, last_name: str | None = None, email: str | None = None, email_verified: bool | None = None, phone: str | None = None, security_phone: str | None = None, security_phone_verified: bool | None = None, href: str | None = None)[source]
Cherry Servers user model.
This model is frozen by default, since it represents an actual Cherry Servers user resource state.
- id
ID of the user.
- Type:
int
- first_name
First name of the user.
- Type:
str | None
- last_name
Last name of the user.
- Type:
str | None
- email
Email address of the user.
- Type:
str | None
- email_verified
Whether user email address is verified.
- Type:
bool | None
- phone
Phone number of the user.
- Type:
str | None
- security_phone
Security phone number of the user.
- Type:
str | None
- security_phone_verified
Whether user security phone number is verified.
- Type:
bool | None
- href
Href URL of the user.
- Type:
str | None
- class cherryservers_sdk_python.users.UserClient(api_client: _client.CherryApiClient, request_timeout: int = 120)[source]
Cherry Servers user client.
Manage Cherry Servers user resources. This class should typically be initialized by
cherryservers_sdk_python.facade.CherryApiFacade.Example
facade = cherryservers_sdk_python.facade.CherryApiFacade(token="my-token") # Retrieve by ID. user = facade.users.get_by_id(123456) # Retrieve current user.. user = facade.users.get_current_user()