Client
The Client class is the main interface for interacting with the Valorant API.
- class valopy.client.Client(api_key, redact_header=True)[source]
Bases:
objectClient for interacting with the Valorant API.
- adapter
The adapter used for making HTTP requests.
- Type:
Adapter
- async get_account_v1(name, tag, force_update=False)[source]
Get Account V1 information.
- Parameters:
name (str) – The name of the account.
tag (str) – The tag of the account.
force_update (bool, optional) – Whether to force update the account information, by default False
- Returns:
The Account V1 information.
- Return type:
- async get_account_v1_by_puuid(puuid, force_update=False)[source]
Get Account V1 information by PUUID.
- Parameters:
puuid (str) – The player’s unique identifier (PUUID).
force_update (bool, optional) – Whether to force update the account information, by default False
- Returns:
The Account V1 information.
- Return type:
- async get_account_v2(name, tag, force_update=False)[source]
Get Account V2 information.
- Parameters:
name (str) – The name of the account.
tag (str) – The tag of the account.
force_update (bool, optional) – Whether to force update the account information, by default False
- Returns:
The Account V2 information.
- Return type:
- async get_account_v2_by_puuid(puuid, force_update=False)[source]
Get Account V2 information by PUUID.
- Parameters:
puuid (str) – The player’s unique identifier (PUUID).
force_update (bool, optional) – Whether to force update the account information, by default False
- Returns:
The Account V2 information.
- Return type:
- async get_content(locale=None)[source]
Get basic content data like season ids or skins.
- Parameters:
locale (Optional[Locale], optional) – The locale for the content data, by default None
- Returns:
The content data retrieved from the API.
- Return type:
- async get_esports_schedule(region=None, league=None)[source]
Get the esports schedule.
- Parameters:
region (EsportsRegion, optional) – Filter by esports region.
league (League, optional) – Filter by esports league.
- Returns:
List of esports events.
- Return type:
list[EsportsEvent]
- async get_leaderboard(region, platform, season=None, puuid=None, name=None, tag=None, size=None, start_index=None)[source]
Get leaderboard for a specific region and platform.
- Parameters:
region (Region) – The region to get leaderboard for.
platform (Platform) – The platform (PC or Console).
season (Season, optional) – The season to filter by (e.g., Season.E9A3).
puuid (str, optional) – Filter by player PUUID. Mutually exclusive with name and tag.
name (str, optional) – Filter by player name. Must be used with tag.
tag (str, optional) – Filter by player tag. Must be used with name.
size (int, optional) – Number of players to return.
start_index (int, optional) – Starting index for pagination.
- Returns:
Leaderboard data with players and pagination info.
- Return type:
Leaderboard
- Raises:
ValoPyValidationError – If both puuid and name/tag are provided, or if name is provided without tag (or vice versa).
- async get_queue_status(region)[source]
Get the current queue status for a region.
- Parameters:
region (Region) – The region to get queue status for.
- Returns:
List of queue configurations for all available game modes.
- Return type:
list[QueueData]
- async get_status(region)[source]
Get the current VALORANT server status for a region.
- Parameters:
region (Region) – The region to get server status for.
- Returns:
The server status including maintenances and incidents.
- Return type:
Status