Statistics

class arez.DataUsed[source]

Represents API usage statistics.

You can get this from the PaladinsAPI.get_data_used method.

Note

API sessions are automatically managed by the wrapper. The data provided here is meant solely for the API usage tracking purposes.

Note

The statistics are calculated over a rolling 24 hours window, meaning that each time you use one request, you will be getting it back exactly 24 hours later. Thus, there is no particular time at which these stats reset.

timestamp

A timestamp of when these statistics were fetched.

Type

datetime.datetime

active_sessions_used

The amount of active sessions currently being used.

Type

int

active_sessions_limit

The maximum amount of active sessions you’re allowed to have at the same time.

The default value is 50.

Type

int

sessions_used

The amount of sessions used within the last 24 hours.

Type

int

sessions_limit

The maximum amount of sessions you’re allowed to use within 24 hours.

The default value is 500.

Type

int

sessions_lifetime

The amount of time, in minutes, that needs to pass since your last request, for the session to be closed.

Your next request is going to automatically start another session.

Type

int

requests_used

The amount of requests used within the last 24 hours.

Type

int

requests_limit

The maximum amount of requests you’re allowed to use within 24 hours.

The default value is 7500.

Type

int

active_sessions_remaining

The amount of active sessions remaining.

Type

int

sessions_remaining

The amount of sessions remaining.

Type

int

requests_remaining

The amount of requests remaining.

Type

int

active_sessions_usage

The percentage of active sessions used.

Type

float

sessions_usage

The percentage of sessions used.

Type

float

requests_usage

The percentage of requests used.

Type

float

active_sessions_remaining_usage

The percentage of active sessions remaining.

Type

float

sessions_remaining_usage

The percentage of sessions remaining.

Type

float

requests_remaining_usage

The percentage of requests remaining.

Type

float

class arez.Stats[source]

Represents casual player stats.

You can find these on the Player.casual attribute.

wins

The amount of wins.

Type

int

losses

The amount of losses.

Type

int

leaves

The amount of times player left / disconnected from a match.

Type

int

matches_played

The amount of matches played. This is just wins + losses.

Type

int

winrate

The calculated winrate as a fraction.

math.nan is returned if there was no matches played.

Type

float

winrate_text

The calculated winrate as a percentage string of up to 3 decimal places accuracy.

The format is: "48.213%"

"N/A" is returned if there was no matches played.

Type

str

class arez.RankedStats[source]

Represents ranked player stats.

You can find these on the Player.ranked_keyboard and Player.ranked_controller attributes.

type

The type of these stats.

Type

Literal[“Keyboard”, “Controller”]

wins

The amount of wins.

Type

int

losses

The amount of losses.

Type

int

leaves

The amount of times player left / disconnected from a match.

Type

int

rank

The player’s current rank.

Type

Rank

points

The amount of TP the player currently has.

Type

int

position

The leaderboard position.

Type

int

season

The current ranked season.

Type

int

matches_played

The amount of matches played. This is just wins + losses.

Type

int

winrate

The calculated winrate as a fraction.

math.nan is returned if there was no matches played.

Type

float

winrate_text

The calculated winrate as a percentage string of up to 3 decimal places accuracy.

The format is: "48.213%"

"N/A" is returned if there was no matches played.

Type

str

class arez.ChampionStats[source]

Represents player’s champion stats.

You can get these from the PartialPlayer.get_champion_stats method.

wins

The amount of wins with this champion.

Type

int

losses

The amount of losses with this champion.

Type

int

kills

The amount of kills with this champion.

Type

int

deaths

The amount of deaths with this champion.

Type

int

assists

The amount of assists with this champion.

Type

int

player

The player these stats are for.

Type

PartialPlayer | Player

champion

The champion these stats are for.

With incomplete cache, this will be a CacheObject with the name and ID set.

Type

Champion | CacheObject

queue

The queue these starts are for.

None means these stats are for all queues.

Type

Queue | None

level

The champion’s mastery level.

Will be 0 if these stats represent a single queue only.

Type

int

experience

The amount of experience this champion has. Will be 0 if these stats represent a single queue only.

Type

int

last_played

A timestamp of when this champion was last played, either in the given queue, or across all queues.

Type

datetime.datetime

credits

The amount of credits earned by playing this champion.

Type

int

playtime

The amount of time spent on playing this champion.

Type

Duration

df

The Dominance Factor.

The formula is: kills * 2 + deaths * -3 + assists.

The value signifies how “useful” the person was to the team overall. Best used when scaled and compared between team members in a match (allied and enemy).

Type

int

kda

The calculated KDA.

The formula is: (kills + assists / 2) / deaths.

math.nan is returned if there was no deaths.

Type

float

kda2

The calculated KDA.

The formula is: (kills + assists / 2) / max(deaths, 1), treating 0 and 1 deaths the same, meaning this will never return math.nan.

Type

float

kda_text

Kills, deaths and assists as a slash-delimited string.

The format is: kills/deaths/assists, or 1/2/3.

Type

str

matches_played

The amount of matches played. This is just wins + losses.

Type

int

winrate

The calculated winrate as a fraction.

math.nan is returned if there was no matches played.

Type

float

winrate_text

The calculated winrate as a percentage string of up to 3 decimal places accuracy.

The format is: "48.213%"

"N/A" is returned if there was no matches played.

Type

str