UserClientAsync
Hierarchy
- ResourceClientAsync
- UserClientAsync
Index
Methods
Properties
Methods
__init__
Initialize the resource client.
Parameters
keyword-onlybase_url: str
API base URL.
keyword-onlypublic_base_url: str
Public CDN base URL.
keyword-onlyhttp_client: HttpClientAsync
HTTP client for making requests.
keyword-onlyresource_path: str
Resource endpoint path (e.g., 'actors', 'datasets').
keyword-onlyclient_registry: ClientRegistryAsync
Bundle of client classes for dependency injection.
optionalkeyword-onlyresource_id: str | None = None
Optional resource ID for single-resource clients.
optionalkeyword-onlyparams: QueryParams | None = None
Optional default parameters for all requests.
optionalkeyword-onlyapi_base_url: str | None = None
Base URL of the API itself, for clients of top-level resources. Defaults to
base_url.
Returns None
get
Return information about user account.
You receive all or only public info based on your token permissions.
https://docs.apify.com/api/v2#/reference/users
Parameters
optionalkeyword-onlytimeout: Timeout = 'short'
Timeout for the API HTTP request.
Returns (UserPublicInfo | UserPrivateInfo) | None
The retrieved user data, or None if the user does not exist.
limits
Return a complete summary of the user account's limits.
It is the same information which is available on the account's Limits page. The returned data includes the current usage cycle, a summary of the account's limits, and the current usage.
Parameters
optionalkeyword-onlytimeout: Timeout = 'short'
Timeout for the API HTTP request.
Returns AccountLimits
The account limits.
monthly_usage
Return monthly usage of the user account.
This includes a complete usage summary for the current usage cycle, an overall sum, as well as a daily breakdown of usage. It is the same information which is available on the account's Billing page. The information includes use of storage, data transfer, and request queue usage.
Parameters
optionalkeyword-onlytimeout: Timeout = 'short'
Timeout for the API HTTP request.
Returns MonthlyUsage
The retrieved monthly usage.
update_limits
Update the account's limits manageable on your account's Limits page.
Parameters
optionalkeyword-onlymax_monthly_usage_usd: int | None = None
Maximum monthly usage in USD.
optionalkeyword-onlydata_retention_days: int | None = None
Data retention period in days.
optionalkeyword-onlytimeout: Timeout = 'short'
Timeout for the API HTTP request.
Returns None
Properties
resource_id
Get the resource ID.
Sub-client for managing user account information.
Provides methods to manage user account information, e.g. get user data or monthly usage. Obtain an instance via an appropriate method on the
ApifyClientAsyncclass.