# UserClient<!-- -->

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 `ApifyClient` class.

### Hierarchy

* [ResourceClient](https://docs.apify.com/api/client/python/api/client/python/reference/class/ResourceClient.md)
  * *UserClient*

## Index[**](#Index)

### Methods

* [**\_\_init\_\_](https://docs.apify.com/api/client/python/api/client/python/reference/class/UserClient.md#__init__)
* [**get](https://docs.apify.com/api/client/python/api/client/python/reference/class/UserClient.md#get)
* [**limits](https://docs.apify.com/api/client/python/api/client/python/reference/class/UserClient.md#limits)
* [**monthly\_usage](https://docs.apify.com/api/client/python/api/client/python/reference/class/UserClient.md#monthly_usage)
* [**update\_limits](https://docs.apify.com/api/client/python/api/client/python/reference/class/UserClient.md#update_limits)

### Properties

* [**resource\_id](https://docs.apify.com/api/client/python/api/client/python/reference/class/UserClient.md#resource_id)

## Methods<!-- -->[**](#Methods)

### [**](#__init__)\_\_init\_\_

* ****\_\_init\_\_**(\*, base\_url, public\_base\_url, http\_client, resource\_path, client\_registry, resource\_id, params): None

- Overrides [ResourceClient.\_\_init\_\_](https://docs.apify.com/api/client/python/api/client/python/reference/class/ResourceClient.md#__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: [HttpClient](https://docs.apify.com/api/client/python/api/client/python/reference/class/HttpClient.md)

    HTTP client for making requests.

  * ##### keyword-onlyresource\_path: str

    Resource endpoint path (e.g., 'actors', 'datasets').

  * ##### keyword-onlyclient\_registry: [ClientRegistry](https://docs.apify.com/api/client/python/api/client/python/reference/class/ClientRegistry.md)

    Bundle of client classes for dependency injection.

  * ##### optionalkeyword-onlyresource\_id: str | None = <!-- -->None

    Optional resource ID for single-resource clients.

  * ##### optionalkeyword-onlyparams: dict | None = <!-- -->None

    Optional default parameters for all requests.

  #### Returns None

### [**](#get)get

* ****get**(\*, timeout): ([UserPublicInfo](https://docs.apify.com/api/client/python/api/client/python/reference/class/UserPublicInfo.md) | [UserPrivateInfo](https://docs.apify.com/api/client/python/api/client/python/reference/class/UserPrivateInfo.md)) | None

- 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](https://docs.apify.com/api/client/python/api/client/python/reference.md#Timeout) = <!-- -->'short'

    Timeout for the API HTTP request.

  #### Returns ([UserPublicInfo](https://docs.apify.com/api/client/python/api/client/python/reference/class/UserPublicInfo.md) | [UserPrivateInfo](https://docs.apify.com/api/client/python/api/client/python/reference/class/UserPrivateInfo.md)) | None

  The retrieved user data, or None if the user does not exist.

### [**](#limits)limits

* ****limits**(\*, timeout): [AccountLimits](https://docs.apify.com/api/client/python/api/client/python/reference/class/AccountLimits.md)

- 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.

  <https://docs.apify.com/api/v2#/reference/users/account-limits/get-account-limits>

  ***

  #### Parameters

  * ##### optionalkeyword-onlytimeout: [Timeout](https://docs.apify.com/api/client/python/api/client/python/reference.md#Timeout) = <!-- -->'short'

    Timeout for the API HTTP request.

  #### Returns [AccountLimits](https://docs.apify.com/api/client/python/api/client/python/reference/class/AccountLimits.md)

  The account limits.

### [**](#monthly_usage)monthly\_usage

* ****monthly\_usage**(\*, timeout): [MonthlyUsage](https://docs.apify.com/api/client/python/api/client/python/reference/class/MonthlyUsage.md)

- 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.

  <https://docs.apify.com/api/v2/#/reference/users/monthly-usage>

  ***

  #### Parameters

  * ##### optionalkeyword-onlytimeout: [Timeout](https://docs.apify.com/api/client/python/api/client/python/reference.md#Timeout) = <!-- -->'short'

    Timeout for the API HTTP request.

  #### Returns [MonthlyUsage](https://docs.apify.com/api/client/python/api/client/python/reference/class/MonthlyUsage.md)

  The retrieved monthly usage.

### [**](#update_limits)update\_limits

* ****update\_limits**(\*, max\_monthly\_usage\_usd, data\_retention\_days, timeout): None

- 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](https://docs.apify.com/api/client/python/api/client/python/reference.md#Timeout) = <!-- -->'short'

    Timeout for the API HTTP request.

  #### Returns None

## Properties<!-- -->[**](#Properties)

### [**](#resource_id)resource\_id

**resource\_id: str | None

Inherited from [ResourceClientBase.resource\_id](https://docs.apify.com/api/client/python/api/client/python/reference/class/ResourceClientBase.md#resource_id)

Get the resource ID.
