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.
- async get_account_v1_by_puuid(puuid, force_update=False)[source]
Get Account V1 information by PUUID.
- async get_account_v2_by_puuid(puuid, force_update=False)[source]
Get Account V2 information by PUUID.
- async get_content(locale=None)[source]
Get basic content data like season ids or skins.
- Parameters:
locale (Optional[
Locale]) – 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 (Optional[
EsportsRegion]) – Filter by esports region.league (Optional[
League]) – 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 (Optional[
Season]) – The season to filter by (e.g., Season.E9A3).puuid (Optional[
str]) – Filter by player PUUID. Mutually exclusive with name and tag.name (Optional[
str]) – Filter by player name. Must be used with tag.tag (Optional[
str]) – Filter by player tag. Must be used with name.size (Optional[
int]) – Number of players to return.start_index (Optional[
int]) – Starting index for pagination.
- Returns:
Leaderboard data with players and pagination info.
- Return type:
- 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:
- async get_version(region=Region.EU)[source]
Get the current API version for a specific region.
- Parameters:
region (Optional[
Region]) – The region to get the API version for, by default Region.EU- Returns:
The version data retrieved from the API.
- Return type:
- async get_website(countrycode)[source]
Get website information for a specific country code.
- Parameters:
countrycode (
CountryCode) – The country code to get the website information for.- Returns:
A list of website content data.
- Return type:
list[
WebsiteContent]