Skip to content

models

This module contains the models used to represent data returned by the WOM API.

Enums related to specific services are also housed in the module.

Tip

Most of the models here you won't create, but a few you will. Those will be documented as such.

Achievement

Bases: BaseModel

Represents an achievement made by a player.

Source code in wom/models/players/models.py
@attrs.define(init=False)
class Achievement(BaseModel):
    """Represents an achievement made by a player."""

    player_id: int
    """The unique ID of the player."""

    name: str
    """The name of the achievement."""

    metric: enums.Metric
    """The [`Metric`][wom.Metric] for this achievement."""

    measure: AchievementMeasure
    """The [`AchievementMeasure`][wom.AchievementMeasure] that
    the player obtained.
    """

    threshold: int
    """The threshold for this achievement."""

    created_at: datetime
    """The date the achievement was achieved."""

    accuracy: int | None
    """The margin of error for the achievements creation date.

    !!! note

        Can be `None` if the achievement hasn't been recalculated since
        the addition of this field (~ Feb 2023). It can also be -1 for
        achievements with unknown dates.
    """

accuracy class-attribute

accuracy: int | None

The margin of error for the achievements creation date.

Note

Can be None if the achievement hasn't been recalculated since the addition of this field (~ Feb 2023). It can also be -1 for achievements with unknown dates.

created_at class-attribute

created_at: datetime

The date the achievement was achieved.

measure class-attribute

measure: AchievementMeasure

The AchievementMeasure that the player obtained.

metric class-attribute

metric: enums.Metric

The Metric for this achievement.

name class-attribute

name: str

The name of the achievement.

player_id class-attribute

player_id: int

The unique ID of the player.

threshold class-attribute

threshold: int

The threshold for this achievement.

AchievementMeasure

Bases: BaseEnum

Measures used to categorize achievements.

Source code in wom/models/players/enums.py
class AchievementMeasure(BaseEnum):
    """Measures used to categorize achievements."""

    Levels = "levels"
    Experience = "experience"
    Kills = "kills"
    Score = "score"
    Value = "value"

AchievementProgress

Bases: BaseModel

Represents progress made toward an achievement.

Source code in wom/models/players/models.py
@attrs.define(init=False)
class AchievementProgress(BaseModel):
    """Represents progress made toward an achievement."""

    player_id: int
    """The unique ID of the player."""

    name: str
    """The name of the achievement."""

    metric: enums.Metric
    """The [`Metric`][wom.Metric] for this achievement."""

    measure: AchievementMeasure
    """The [`AchievementMeasure`][wom.AchievementMeasure] that
    the player obtained.
    """

    threshold: int
    """The threshold for this achievement."""

    created_at: datetime | None
    """The date the achievement was achieved, or `None` if it has not
    been achieved.
    """

    accuracy: int | None
    """The margin of error for the achievements creation date.

    !!! note

        Can be `None` if the achievement hasn't been recalculated since
        the addition of this field (~ Feb 2023). It can also be -1 for
        achievements with unknown dates.
    """

accuracy class-attribute

accuracy: int | None

The margin of error for the achievements creation date.

Note

Can be None if the achievement hasn't been recalculated since the addition of this field (~ Feb 2023). It can also be -1 for achievements with unknown dates.

created_at class-attribute

created_at: datetime | None

The date the achievement was achieved, or None if it has not been achieved.

measure class-attribute

measure: AchievementMeasure

The AchievementMeasure that the player obtained.

metric class-attribute

metric: enums.Metric

The Metric for this achievement.

name class-attribute

name: str

The name of the achievement.

player_id class-attribute

player_id: int

The unique ID of the player.

threshold class-attribute

threshold: int

The threshold for this achievement.

Activity

Bases: BaseModel

Details regarding a particular activity.

Source code in wom/models/players/models.py
@attrs.define(init=False)
class Activity(BaseModel):
    """Details regarding a particular activity."""

    metric: enums.Activities
    """The [`Activities`][wom.Activities] being measured."""

    rank: int
    """The players rank in the activity."""

    score: int
    """The players score in the activity."""

metric class-attribute

metric: enums.Activities

The Activities being measured.

rank class-attribute

rank: int

The players rank in the activity.

score class-attribute

score: int

The players score in the activity.

ActivityGains

Bases: BaseModel

Represents activity gains made by a player.

Source code in wom/models/players/models.py
@attrs.define(init=False)
class ActivityGains(BaseModel):
    """Represents activity gains made by a player."""

    metric: enums.Activities
    """The [`Activities`][wom.Activities] being measured."""

    rank: Gains
    """The rank [`Gains`][wom.Gains]."""

    score: Gains
    """The score [`Gains`][wom.Gains]."""

metric class-attribute

metric: enums.Activities

The Activities being measured.

rank class-attribute

rank: Gains

The rank Gains.

score class-attribute

score: Gains

The score Gains.

ActivityLeader

Bases: BaseModel

Represents a leader in a particular activity.

Source code in wom/models/groups/models.py
@attrs.define(init=False)
class ActivityLeader(BaseModel):
    """Represents a leader in a particular activity."""

    metric: enums.Activities
    """The [`Activities`][wom.Activities] being measured."""

    rank: int
    """The players rank in the activity."""

    score: int
    """The players score in the activity."""

    player: Player
    """The player leading in this metric."""

metric class-attribute

metric: enums.Activities

The Activities being measured.

player class-attribute

player: Player

The player leading in this metric.

rank class-attribute

rank: int

The players rank in the activity.

score class-attribute

score: int

The players score in the activity.

BaseModel

The base model all library models inherit from.

Source code in wom/models/base.py
@attrs.define
class BaseModel:
    """The base model all library models inherit from."""

    def to_dict(self) -> dict[str, t.Any]:
        """Converts this class into a dictionary.

        Returns:
            The requested dictionary.
        """
        return attrs.asdict(self)

to_dict

to_dict() -> dict[str, t.Any]

Converts this class into a dictionary.

Returns:

Type Description
dict[str, t.Any]

The requested dictionary.

Source code in wom/models/base.py
def to_dict(self) -> dict[str, t.Any]:
    """Converts this class into a dictionary.

    Returns:
        The requested dictionary.
    """
    return attrs.asdict(self)

Boss

Bases: BaseModel

Details regarding a particular boss.

Source code in wom/models/players/models.py
@attrs.define(init=False)
class Boss(BaseModel):
    """Details regarding a particular boss."""

    metric: enums.Bosses
    """The [`Bosses`][wom.Bosses] being measured."""

    rank: int
    """The players rank in killing the boss."""

    kills: int
    """The number of kills the player has."""

    ehb: float
    """The players efficient hours bossed for the boss."""

ehb class-attribute

ehb: float

The players efficient hours bossed for the boss.

kills class-attribute

kills: int

The number of kills the player has.

metric class-attribute

metric: enums.Bosses

The Bosses being measured.

rank class-attribute

rank: int

The players rank in killing the boss.

BossGains

Bases: BaseModel

Represents boss gains made by a player.

Source code in wom/models/players/models.py
@attrs.define(init=False)
class BossGains(BaseModel):
    """Represents boss gains made by a player."""

    metric: enums.Bosses
    """The [`Bosses`][wom.Bosses] being measured."""

    ehb: Gains
    """The efficient hours bossed [`Gains`][wom.Gains]."""

    rank: Gains
    """The rank [`Gains`][wom.Gains]."""

    kills: Gains
    """The boss kill [`Gains`][wom.Gains]."""

ehb class-attribute

ehb: Gains

The efficient hours bossed Gains.

kills class-attribute

kills: Gains

The boss kill Gains.

metric class-attribute

metric: enums.Bosses

The Bosses being measured.

rank class-attribute

rank: Gains

The rank Gains.

BossLeader

Bases: BaseModel

Represents a leader in a particular boss.

Source code in wom/models/groups/models.py
@attrs.define(init=False)
class BossLeader(BaseModel):
    """Represents a leader in a particular boss."""

    metric: enums.Bosses
    """The [`Bosses`][wom.Bosses] being measured."""

    rank: int
    """The players rank in killing the boss."""

    kills: int
    """The number of kills the player has."""

    player: Player
    """The player leading in this metric."""

kills class-attribute

kills: int

The number of kills the player has.

metric class-attribute

metric: enums.Bosses

The Bosses being measured.

player class-attribute

player: Player

The player leading in this metric.

rank class-attribute

rank: int

The players rank in killing the boss.

Competition

Bases: BaseModel

Represents a competition.

Source code in wom/models/competitions/models.py
@attrs.define(init=False)
class Competition(BaseModel):
    """Represents a competition."""

    id: int
    """The unique ID of the competition."""

    title: str
    """The title of the competition."""

    metric: enums.Metric
    """The metric being measured."""

    type: CompetitionType
    """The [CompetitionType][wom.CompetitionType]."""

    starts_at: datetime
    """The date the competition started at."""

    ends_at: datetime
    """The date the competition ended at."""

    group_id: int | None
    """The optional group id associated with the competition."""

    score: int
    """The competition's score."""

    created_at: datetime
    """The date the competition was created."""

    updated_at: datetime
    """The date the competition was updated."""

    participant_count: int
    """The number of players participating."""

    group: Group | None
    """The [`Group`][wom.Group] associated with the competition, if
    there is one.
    """

created_at class-attribute

created_at: datetime

The date the competition was created.

ends_at class-attribute

ends_at: datetime

The date the competition ended at.

group class-attribute

group: Group | None

The Group associated with the competition, if there is one.

group_id class-attribute

group_id: int | None

The optional group id associated with the competition.

id class-attribute

id: int

The unique ID of the competition.

metric class-attribute

metric: enums.Metric

The metric being measured.

participant_count class-attribute

participant_count: int

The number of players participating.

score class-attribute

score: int

The competition's score.

starts_at class-attribute

starts_at: datetime

The date the competition started at.

title class-attribute

title: str

The title of the competition.

type class-attribute

type: CompetitionType

updated_at class-attribute

updated_at: datetime

The date the competition was updated.

CompetitionDetail

Bases: BaseModel

Represents competition details.

Source code in wom/models/competitions/models.py
@attrs.define(init=False)
class CompetitionDetail(BaseModel):
    """Represents competition details."""

    competition: Competition
    """The [`Competition`][wom.Competition] that is being detailed."""

    participations: list[CompetitionParticipationDetail]
    """A list of [`CompetitionParticipationDetail`]
    [wom.CompetitionParticipationDetail] participations for this
    competition.
    """

competition class-attribute

competition: Competition

The Competition that is being detailed.

participations class-attribute

participations: list[CompetitionParticipationDetail]

A list of CompetitionParticipationDetail participations for this competition.

CompetitionHistoryDataPoint

Bases: BaseModel

A competition history data point.

Source code in wom/models/competitions/models.py
@attrs.define(init=False)
class CompetitionHistoryDataPoint(BaseModel):
    """A competition history data point."""

    date: datetime
    """The date this data point occurred."""

    value: int
    """The value of the data point."""

date class-attribute

date: datetime

The date this data point occurred.

value class-attribute

value: int

The value of the data point.

CompetitionParticipation

Bases: BaseModel

Represents a competition participation.

Source code in wom/models/competitions/models.py
@attrs.define(init=False)
class CompetitionParticipation(BaseModel):
    """Represents a competition participation."""

    data: Participation
    """The [`Participation`][wom.models.Participation] achieved in this
    competition.
    """

    player: Player
    """The [`Player`][wom.Player] that participated in this competition.
    """

data class-attribute

data: Participation

The Participation achieved in this competition.

player class-attribute

player: Player

The Player that participated in this competition.

CompetitionParticipationDetail

Bases: BaseModel

Represents competition participation details.

Source code in wom/models/competitions/models.py
@attrs.define(init=False)
class CompetitionParticipationDetail(BaseModel):
    """Represents competition participation details."""

    participation: CompetitionParticipation
    """The [`CompetitionParticipation`][wom.CompetitionParticipation]
    in these details.
    """

    progress: CompetitionProgress
    """The [`CompetitionProgress`][wom.CompetitionProgress] that was
    made.
    """

participation class-attribute

participation: CompetitionParticipation

The CompetitionParticipation in these details.

progress class-attribute

progress: CompetitionProgress

The CompetitionProgress that was made.

CompetitionProgress

Bases: BaseModel

Represents progress in a competition.

Source code in wom/models/competitions/models.py
@attrs.define(init=False)
class CompetitionProgress(BaseModel):
    """Represents progress in a competition."""

    start: int
    """The starting value for the competition's metric."""

    end: int
    """The ending value for the competition's metric."""

    gained: int
    """The amount of progress gained in the metric."""

end class-attribute

end: int

The ending value for the competition's metric.

gained class-attribute

gained: int

The amount of progress gained in the metric.

start class-attribute

start: int

The starting value for the competition's metric.

CompetitionStatus

Bases: BaseEnum

Potential competition statuses.

Source code in wom/models/competitions/enums.py
class CompetitionStatus(BaseEnum):
    """Potential competition statuses."""

    Upcoming = "upcoming"
    Ongoing = "ongoing"
    Finished = "finished"

CompetitionType

Bases: BaseEnum

Competition types available on WOM.

Source code in wom/models/competitions/enums.py
class CompetitionType(BaseEnum):
    """Competition types available on WOM."""

    Classic = "classic"
    Team = "team"

CompetitionWithParticipations

Bases: BaseModel

Represents a competition with participations.

Source code in wom/models/competitions/models.py
@attrs.define(init=False)
class CompetitionWithParticipations(BaseModel):
    """Represents a competition with participations."""

    competition: Competition
    """The [`Competition`][wom.Competition] itself."""

    participations: list[CompetitionParticipation]
    """A list containing the [`CompetitionParticipations`]
    [wom.CompetitionParticipation].
    """

    verification_code: str | None
    """The verification code for the competition.

    !!! note

        Only returned when a competition is created and will be
        `None` otherwise.
    """

competition class-attribute

competition: Competition

The Competition itself.

participations class-attribute

participations: list[CompetitionParticipation]

A list containing the CompetitionParticipations.

verification_code class-attribute

verification_code: str | None

The verification code for the competition.

Note

Only returned when a competition is created and will be None otherwise.

ComputedGains

Bases: BaseModel

Represents computed gains made by a player.

Source code in wom/models/players/models.py
@attrs.define(init=False)
class ComputedGains(BaseModel):
    """Represents computed gains made by a player."""

    metric: enums.ComputedMetrics
    """The [`ComputedMetrics`][wom.ComputedMetrics] being measured."""

    rank: Gains
    """The rank [`Gains`][wom.Gains]."""

    value: Gains
    """The value [`Gains`][wom.Gains]."""

metric class-attribute

metric: enums.ComputedMetrics

The ComputedMetrics being measured.

rank class-attribute

rank: Gains

The rank Gains.

value class-attribute

value: Gains

The value Gains.

ComputedMetric

Bases: BaseModel

Details regarding a computed metric.

Source code in wom/models/players/models.py
@attrs.define(init=False)
class ComputedMetric(BaseModel):
    """Details regarding a computed metric."""

    metric: enums.ComputedMetrics
    """The [`ComputedMetrics`][wom.ComputedMetrics] being
    measured.
    """

    rank: int
    """The players rank in the computed metric."""

    value: float
    """The value of the computed metric."""

metric class-attribute

metric: enums.ComputedMetrics

The ComputedMetrics being measured.

rank class-attribute

rank: int

The players rank in the computed metric.

value class-attribute

value: float

The value of the computed metric.

ComputedMetricLeader

Bases: BaseModel

Represents a leader in a particular computed metric.

Source code in wom/models/groups/models.py
@attrs.define(init=False)
class ComputedMetricLeader(BaseModel):
    """Represents a leader in a particular computed metric."""

    metric: enums.ComputedMetrics
    """The [`ComputedMetrics`][wom.ComputedMetrics] being
    measured.
    """

    rank: int
    """The players rank in the computed metric."""

    value: int
    """The value of the computed metric."""

    player: Player
    """The player leading in this metric."""

metric class-attribute

metric: enums.ComputedMetrics

The ComputedMetrics being measured.

player class-attribute

player: Player

The player leading in this metric.

rank class-attribute

rank: int

The players rank in the computed metric.

value class-attribute

value: int

The value of the computed metric.

Country

Bases: BaseEnum

Countries in the world.

Source code in wom/models/players/enums.py
class Country(BaseEnum):
    """Countries in the world."""

    Ad = "AD"
    Ae = "AE"
    Af = "AF"
    Ag = "AG"
    Ai = "AI"
    Al = "AL"
    Am = "AM"
    Ao = "AO"
    Aq = "AQ"
    Ar = "AR"
    As = "AS"
    At = "AT"
    Au = "AU"
    Aw = "AW"
    Ax = "AX"
    Az = "AZ"
    Ba = "BA"
    Bb = "BB"
    Bd = "BD"
    Be = "BE"
    Bf = "BF"
    Bg = "BG"
    Bh = "BH"
    Bi = "BI"
    Bj = "BJ"
    Bl = "BL"
    Bm = "BM"
    Bn = "BN"
    Bo = "BO"
    Bq = "BQ"
    Br = "BR"
    Bs = "BS"
    Bt = "BT"
    Bv = "BV"
    Bw = "BW"
    By = "BY"
    Bz = "BZ"
    Ca = "CA"
    Cc = "CC"
    Cd = "CD"
    Cf = "CF"
    Cg = "CG"
    Ch = "CH"
    Ci = "CI"
    Ck = "CK"
    Cl = "CL"
    Cm = "CM"
    Cn = "CN"
    Co = "CO"
    Cr = "CR"
    Cu = "CU"
    Cv = "CV"
    Cw = "CW"
    Cx = "CX"
    Cy = "CY"
    Cz = "CZ"
    De = "DE"
    Dj = "DJ"
    Dk = "DK"
    Dm = "DM"
    Do = "DO"
    Dz = "DZ"
    Ec = "EC"
    Ee = "EE"
    Eg = "EG"
    Eh = "EH"
    Er = "ER"
    Es = "ES"
    Et = "ET"
    Fi = "FI"
    Fj = "FJ"
    Fk = "FK"
    Fm = "FM"
    Fo = "FO"
    Fr = "FR"
    Ga = "GA"
    Gb = "GB"
    Gd = "GD"
    Ge = "GE"
    Gf = "GF"
    Gg = "GG"
    Gh = "GH"
    Gi = "GI"
    Gl = "GL"
    Gm = "GM"
    Gn = "GN"
    Gp = "GP"
    Gq = "GQ"
    Gr = "GR"
    Gs = "GS"
    Gt = "GT"
    Gu = "GU"
    Gw = "GW"
    Gy = "GY"
    Hk = "HK"
    Hm = "HM"
    Hn = "HN"
    Hr = "HR"
    Ht = "HT"
    Hu = "HU"
    Id = "ID"
    Ie = "IE"
    Il = "IL"
    Im = "IM"
    In = "IN"
    Io = "IO"
    Iq = "IQ"
    Ir = "IR"
    Is = "IS"
    It = "IT"
    Je = "JE"
    Jm = "JM"
    Jo = "JO"
    Jp = "JP"
    Ke = "KE"
    Kg = "KG"
    Kh = "KH"
    Ki = "KI"
    Km = "KM"
    Kn = "KN"
    Kp = "KP"
    Kr = "KR"
    Kw = "KW"
    Ky = "KY"
    Kz = "KZ"
    La = "LA"
    Lb = "LB"
    Lc = "LC"
    Li = "LI"
    Lk = "LK"
    Lr = "LR"
    Ls = "LS"
    Lt = "LT"
    Lu = "LU"
    Lv = "LV"
    Ly = "LY"
    Ma = "MA"
    Mc = "MC"
    Md = "MD"
    Me = "ME"
    Mf = "MF"
    Mg = "MG"
    Mh = "MH"
    Mk = "MK"
    Ml = "ML"
    Mm = "MM"
    Mn = "MN"
    Mo = "MO"
    Mp = "MP"
    Mq = "MQ"
    Mr = "MR"
    Ms = "MS"
    Mt = "MT"
    Mu = "MU"
    Mv = "MV"
    Mw = "MW"
    Mx = "MX"
    My = "MY"
    Mz = "MZ"
    Na = "NA"
    Nc = "NC"
    Ne = "NE"
    Nf = "NF"
    Ng = "NG"
    Ni = "NI"
    Nl = "NL"
    No = "NO"
    Np = "NP"
    Nr = "NR"
    Nu = "NU"
    Nz = "NZ"
    Om = "OM"
    Pa = "PA"
    Pe = "PE"
    Pf = "PF"
    Pg = "PG"
    Ph = "PH"
    Pk = "PK"
    Pl = "PL"
    Pm = "PM"
    Pn = "PN"
    Pr = "PR"
    Ps = "PS"
    Pt = "PT"
    Pw = "PW"
    Py = "PY"
    Qa = "QA"
    Re = "RE"
    Ro = "RO"
    Rs = "RS"
    Ru = "RU"
    Rw = "RW"
    Sa = "SA"
    Sb = "SB"
    Sc = "SC"
    Sd = "SD"
    Se = "SE"
    Sg = "SG"
    Sh = "SH"
    Si = "SI"
    Sj = "SJ"
    Sk = "SK"
    Sl = "SL"
    Sm = "SM"
    Sn = "SN"
    So = "SO"
    Sr = "SR"
    Ss = "SS"
    St = "ST"
    Sv = "SV"
    Sx = "SX"
    Sy = "SY"
    Sz = "SZ"
    Tc = "TC"
    Td = "TD"
    Tf = "TF"
    Tg = "TG"
    Th = "TH"
    Tj = "TJ"
    Tk = "TK"
    Tl = "TL"
    Tm = "TM"
    Tn = "TN"
    To = "TO"
    Tr = "TR"
    Tt = "TT"
    Tv = "TV"
    Tw = "TW"
    Tz = "TZ"
    Ua = "UA"
    Ug = "UG"
    Um = "UM"
    Us = "US"
    Uy = "UY"
    Uz = "UZ"
    Va = "VA"
    Vc = "VC"
    Ve = "VE"
    Vg = "VG"
    Vi = "VI"
    Vn = "VN"
    Vu = "VU"
    Wf = "WF"
    Ws = "WS"
    Ye = "YE"
    Yt = "YT"
    Za = "ZA"
    Zm = "ZM"
    Zw = "ZW"

DeltaLeaderboardEntry

Bases: BaseModel

Represents a leaderboard entry over the given delta.

Source code in wom/models/deltas/models.py
@attrs.define(init=False)
class DeltaLeaderboardEntry(BaseModel):
    """Represents a leaderboard entry over the given delta."""

    player_id: int
    """The ID of the player holding this leaderboard entry."""

    gained: int
    """The value gained over the delta."""

    start_date: datetime
    """The start date of the delta."""

    end_date: datetime
    """The end date of the delta."""

    player: Player
    """The [`Player`][wom.Player] holding this leaderboard entry."""

end_date class-attribute

end_date: datetime

The end date of the delta.

gained class-attribute

gained: int

The value gained over the delta.

player class-attribute

player: Player

The Player holding this leaderboard entry.

player_id class-attribute

player_id: int

The ID of the player holding this leaderboard entry.

start_date class-attribute

start_date: datetime

The start date of the delta.

Gains

Bases: BaseModel

Represents gains made by a player.

Source code in wom/models/players/models.py
@attrs.define(init=False)
class Gains(BaseModel):
    """Represents gains made by a player."""

    gained: float
    """The amount gained."""

    start: float
    """The starting amount."""

    end: float
    """The ending amount."""

end class-attribute

end: float

The ending amount.

gained class-attribute

gained: float

The amount gained.

start class-attribute

start: float

The starting amount.

Group

Bases: BaseModel

Represents a group of players on WOM.

Source code in wom/models/groups/models.py
@attrs.define(init=False)
class Group(BaseModel):
    """Represents a group of players on WOM."""

    id: int
    """The unique ID for this group."""

    name: str
    """The groups name."""

    clan_chat: str
    """The clan chat for this group."""

    description: str | None
    """The groups optional description."""

    homeworld: int | None
    """The groups optional homeworld."""

    verified: bool
    """Whether or not this group is verified."""

    score: int
    """The groups score."""

    created_at: datetime
    """The date the group was created."""

    updated_at: datetime
    """The date the group was updated."""

    member_count: int
    """The number of members in the group."""

clan_chat class-attribute

clan_chat: str

The clan chat for this group.

created_at class-attribute

created_at: datetime

The date the group was created.

description class-attribute

description: str | None

The groups optional description.

homeworld class-attribute

homeworld: int | None

The groups optional homeworld.

id class-attribute

id: int

The unique ID for this group.

member_count class-attribute

member_count: int

The number of members in the group.

name class-attribute

name: str

The groups name.

score class-attribute

score: int

The groups score.

updated_at class-attribute

updated_at: datetime

The date the group was updated.

verified class-attribute

verified: bool

Whether or not this group is verified.

GroupDetail

Bases: BaseModel

Represents details about a group.

Source code in wom/models/groups/models.py
@attrs.define(init=False)
class GroupDetail(BaseModel):
    """Represents details about a group."""

    group: Group
    """The [`Group`][wom.Group] itself."""

    memberships: list[GroupMembership]
    """A list of [`GroupMemberships`][wom.GroupMembership]."""

    verification_code: str | None
    """The optional verification code for the group.

    !!! note

        This will only be present on group creation.
    """

group class-attribute

group: Group

The Group itself.

memberships class-attribute

memberships: list[GroupMembership]

A list of GroupMemberships.

verification_code class-attribute

verification_code: str | None

The optional verification code for the group.

Note

This will only be present on group creation.

GroupHiscoresActivityItem

Bases: BaseModel

Represents a group hiscores item for activities.

Source code in wom/models/groups/models.py
@attrs.define(init=False)
class GroupHiscoresActivityItem(BaseModel):
    """Represents a group hiscores item for activities."""

    rank: int
    """The rank of the hiscore."""

    score: int
    """The activity score."""

rank class-attribute

rank: int

The rank of the hiscore.

score class-attribute

score: int

The activity score.

GroupHiscoresBossItem

Bases: BaseModel

Represents a group hiscores item for bosses.

Source code in wom/models/groups/models.py
@attrs.define(init=False)
class GroupHiscoresBossItem(BaseModel):
    """Represents a group hiscores item for bosses."""

    rank: int
    """The rank of the hiscore."""

    kills: int
    """The number of boss kills."""

kills class-attribute

kills: int

The number of boss kills.

rank class-attribute

rank: int

The rank of the hiscore.

GroupHiscoresComputedMetricItem

Bases: BaseModel

Represents a group hiscores item for computed metrics.

Source code in wom/models/groups/models.py
@attrs.define(init=False)
class GroupHiscoresComputedMetricItem(BaseModel):
    """Represents a group hiscores item for computed metrics."""

    rank: int
    """The rank of the hiscore."""

    value: int
    """The value of the computed metric."""

rank class-attribute

rank: int

The rank of the hiscore.

value class-attribute

value: int

The value of the computed metric.

GroupHiscoresEntry

Bases: BaseModel

Represents a group hiscores entry.

Source code in wom/models/groups/models.py
@attrs.define(init=False)
class GroupHiscoresEntry(BaseModel):
    """Represents a group hiscores entry."""

    player: Player
    """The [`Player`][wom.Player] responsible for the entry."""

    data: (
        GroupHiscoresActivityItem
        | GroupHiscoresBossItem
        | GroupHiscoresSkillItem
        | GroupHiscoresComputedMetricItem
    )
    """The data for this hiscores entry."""

data class-attribute

data: GroupHiscoresActivityItem | GroupHiscoresBossItem | GroupHiscoresSkillItem | GroupHiscoresComputedMetricItem

The data for this hiscores entry.

player class-attribute

player: Player

The Player responsible for the entry.

GroupHiscoresSkillItem

Bases: BaseModel

Represents a group hiscores item for skills.

Source code in wom/models/groups/models.py
@attrs.define(init=False)
class GroupHiscoresSkillItem(BaseModel):
    """Represents a group hiscores item for skills."""

    rank: int
    """The rank of the hiscore."""

    level: int
    """The level of the skill."""

    experience: int
    """The experience in the skill."""

experience class-attribute

experience: int

The experience in the skill.

level class-attribute

level: int

The level of the skill.

rank class-attribute

rank: int

The rank of the hiscore.

GroupMemberFragment

Bases: BaseModel

Represents a condensed group member.

Parameters:

Name Type Description Default
username str

The username of the group member.

required
role GroupRole | None

The optional GroupRole to give the member.

None

Tip

This is a model class that you will create in order to send data to some endpoints.

Source code in wom/models/groups/models.py
@attrs.define
class GroupMemberFragment(BaseModel):
    """Represents a condensed group member.

    Args:
        username: The username of the group member.

        role: The optional [`GroupRole`][wom.models.GroupRole] to
            give the member.

    !!! tip

        This is a model class that you will create in order to send
        data to some endpoints.
    """

    def __init__(self, username: str, role: GroupRole | None = None) -> None:
        self.username = username
        self.role = role

    username: str
    """The group members username."""

    role: GroupRole | None
    """The optional [`GroupRole`][wom.GroupRole] for the member.
    """

role class-attribute instance-attribute

role: GroupRole | None

The optional GroupRole for the member.

username class-attribute instance-attribute

username: str

The group members username.

GroupMembership

Bases: BaseModel

Represents a group membership.

Source code in wom/models/groups/models.py
@attrs.define(init=False)
class GroupMembership(BaseModel):
    """Represents a group membership."""

    player: Player
    """The [`Player`][wom.Player] that is a member."""

    membership: Membership
    """The [`Membership`][wom.Membership] itself."""

membership class-attribute

membership: Membership

The Membership itself.

player class-attribute

player: Player

The Player that is a member.

GroupRole

Bases: BaseEnum

Roles that can be assigned to group members.

Source code in wom/models/groups/enums.py
class GroupRole(BaseEnum):
    """Roles that can be assigned to group members."""

    Achiever = "achiever"
    Adamant = "adamant"
    Adept = "adept"
    Administrator = "administrator"
    Admiral = "admiral"
    Adventurer = "adventurer"
    Air = "air"
    Anchor = "anchor"
    Apothecary = "apothecary"
    Archer = "archer"
    Armadylean = "armadylean"
    Artillery = "artillery"
    Artisan = "artisan"
    Asgarnian = "asgarnian"
    Assassin = "assassin"
    Assistant = "assistant"
    Astral = "astral"
    Athlete = "athlete"
    Attacker = "attacker"
    Bandit = "bandit"
    Bandosian = "bandosian"
    Barbarian = "barbarian"
    Battlemage = "battlemage"
    Beast = "beast"
    Berserker = "berserker"
    Blisterwood = "blisterwood"
    Blood = "blood"
    Blue = "blue"
    Bob = "bob"
    Body = "body"
    Brassican = "brassican"
    Brawler = "brawler"
    Brigadier = "brigadier"
    Brigand = "brigand"
    Bronze = "bronze"
    Bruiser = "bruiser"
    Bulwark = "bulwark"
    Burglar = "burglar"
    Burnt = "burnt"
    Cadet = "cadet"
    Captain = "captain"
    Carry = "carry"
    Champion = "champion"
    Chaos = "chaos"
    Cleric = "cleric"
    Collector = "collector"
    Colonel = "colonel"
    Commander = "commander"
    Competitor = "competitor"
    Completionist = "completionist"
    Constructor = "constructor"
    Cook = "cook"
    Coordinator = "coordinator"
    Corporal = "corporal"
    Cosmic = "cosmic"
    Councillor = "councillor"
    Crafter = "crafter"
    Crew = "crew"
    Crusader = "crusader"
    Cutpurse = "cutpurse"
    Death = "death"
    Defender = "defender"
    Defiler = "defiler"
    Deputy_owner = "deputy_owner"
    Destroyer = "destroyer"
    Diamond = "diamond"
    Diseased = "diseased"
    Doctor = "doctor"
    Dogsbody = "dogsbody"
    Dragon = "dragon"
    Dragonstone = "dragonstone"
    Druid = "druid"
    Duellist = "duellist"
    Earth = "earth"
    Elite = "elite"
    Emerald = "emerald"
    Enforcer = "enforcer"
    Epic = "epic"
    Executive = "executive"
    Expert = "expert"
    Explorer = "explorer"
    Farmer = "farmer"
    Feeder = "feeder"
    Fighter = "fighter"
    Fire = "fire"
    Firemaker = "firemaker"
    Firestarter = "firestarter"
    Fisher = "fisher"
    Fletcher = "fletcher"
    Forager = "forager"
    Fremennik = "fremennik"
    Gamer = "gamer"
    Gatherer = "gatherer"
    General = "general"
    Gnome_child = "gnome_child"
    Gnome_elder = "gnome_elder"
    Goblin = "goblin"
    Gold = "gold"
    Goon = "goon"
    Green = "green"
    Grey = "grey"
    Guardian = "guardian"
    Guthixian = "guthixian"
    Harpoon = "harpoon"
    Healer = "healer"
    Hellcat = "hellcat"
    Helper = "helper"
    Herbologist = "herbologist"
    Hero = "hero"
    Holy = "holy"
    Hoarder = "hoarder"
    Hunter = "hunter"
    Ignitor = "ignitor"
    Illusionist = "illusionist"
    Imp = "imp"
    Infantry = "infantry"
    Inquisitor = "inquisitor"
    Iron = "iron"
    Jade = "jade"
    Justiciar = "justiciar"
    Kandarin = "kandarin"
    Karamjan = "karamjan"
    Kharidian = "kharidian"
    Kitten = "kitten"
    Knight = "knight"
    Labourer = "labourer"
    Law = "law"
    Leader = "leader"
    Learner = "learner"
    Legacy = "legacy"
    Legend = "legend"
    Legionnaire = "legionnaire"
    Lieutenant = "lieutenant"
    Looter = "looter"
    Lumberjack = "lumberjack"
    Magic = "magic"
    Magician = "magician"
    Major = "major"
    Maple = "maple"
    Marshal = "marshal"
    Master = "master"
    Maxed = "maxed"
    Mediator = "mediator"
    Medic = "medic"
    Mentor = "mentor"
    Member = "member"
    Merchant = "merchant"
    Mind = "mind"
    Miner = "miner"
    Minion = "minion"
    Misthalinian = "misthalinian"
    Mithril = "mithril"
    Moderator = "moderator"
    Monarch = "monarch"
    Morytanian = "morytanian"
    Mystic = "mystic"
    Myth = "myth"
    Natural = "natural"
    Nature = "nature"
    Necromancer = "necromancer"
    Ninja = "ninja"
    Noble = "noble"
    Novice = "novice"
    Nurse = "nurse"
    Oak = "oak"
    Officer = "officer"
    Onyx = "onyx"
    Opal = "opal"
    Oracle = "oracle"
    Orange = "orange"
    Owner = "owner"
    Page = "page"
    Paladin = "paladin"
    Pawn = "pawn"
    Pilgrim = "pilgrim"
    Pine = "pine"
    Pink = "pink"
    Prefect = "prefect"
    Priest = "priest"
    Private = "private"
    Prodigy = "prodigy"
    Proselyte = "proselyte"
    Prospector = "prospector"
    Protector = "protector"
    Pure = "pure"
    Purple = "purple"
    Pyromancer = "pyromancer"
    Quester = "quester"
    Racer = "racer"
    Raider = "raider"
    Ranger = "ranger"
    Record_chaser = "record_chaser"
    Recruit = "recruit"
    Recruiter = "recruiter"
    Red_topaz = "red_topaz"
    Red = "red"
    Rogue = "rogue"
    Ruby = "ruby"
    Rune = "rune"
    Runecrafter = "runecrafter"
    Sage = "sage"
    Sapphire = "sapphire"
    Saradominist = "saradominist"
    Saviour = "saviour"
    Scavenger = "scavenger"
    Scholar = "scholar"
    Scourge = "scourge"
    Scout = "scout"
    Scribe = "scribe"
    Seer = "seer"
    Senator = "senator"
    Sentry = "sentry"
    Serenist = "serenist"
    Sergeant = "sergeant"
    Shaman = "shaman"
    Sheriff = "sheriff"
    Short_green_guy = "short_green_guy"
    Skiller = "skiller"
    Skulled = "skulled"
    Slayer = "slayer"
    Smiter = "smiter"
    Smith = "smith"
    Smuggler = "smuggler"
    Sniper = "sniper"
    Soul = "soul"
    Specialist = "specialist"
    Speed_runner = "speed_runner"
    Spellcaster = "spellcaster"
    Squire = "squire"
    Staff = "staff"
    Steel = "steel"
    Strider = "strider"
    Striker = "striker"
    Summoner = "summoner"
    Superior = "superior"
    Supervisor = "supervisor"
    Teacher = "teacher"
    Templar = "templar"
    Therapist = "therapist"
    Thief = "thief"
    Tirannian = "tirannian"
    Trialist = "trialist"
    Trickster = "trickster"
    Tzkal = "tzkal"
    Tztok = "tztok"
    Unholy = "unholy"
    Vagrant = "vagrant"
    Vanguard = "vanguard"
    Walker = "walker"
    Wanderer = "wanderer"
    Warden = "warden"
    Warlock = "warlock"
    Warrior = "warrior"
    Water = "water"
    Wild = "wild"
    Willow = "willow"
    Wily = "wily"
    Wintumber = "wintumber"
    Witch = "witch"
    Wizard = "wizard"
    Worker = "worker"
    Wrath = "wrath"
    Xerician = "xerician"
    Yellow = "yellow"
    Yew = "yew"
    Zamorakian = "zamorakian"
    Zarosian = "zarosian"
    Zealot = "zealot"
    Zenyte = "zenyte"

GroupStatistics

Bases: BaseModel

Represents accumulated group statistics.

Source code in wom/models/groups/models.py
@attrs.define(init=False)
class GroupStatistics(BaseModel):
    """Represents accumulated group statistics."""

    maxed_combat_count: int
    """The number of maxed combat players in the group."""

    maxed_total_count: int
    """The number of maxed total level players in the group."""

    maxed_200ms_count: int
    """The number of maxed 200M xp players in the group."""

    average_stats: Snapshot
    """The average group statistics in a [`Snapshot`][wom.Snapshot]."""

    metric_leaders: MetricLeaders
    """The [`MetricLeaders`][wom.MetricLeaders] in this group for each
    metric.
    """

average_stats class-attribute

average_stats: Snapshot

The average group statistics in a Snapshot.

maxed_200ms_count class-attribute

maxed_200ms_count: int

The number of maxed 200M xp players in the group.

maxed_combat_count class-attribute

maxed_combat_count: int

The number of maxed combat players in the group.

maxed_total_count class-attribute

maxed_total_count: int

The number of maxed total level players in the group.

metric_leaders class-attribute

metric_leaders: MetricLeaders

The MetricLeaders in this group for each metric.

HttpErrorResponse

Bases: BaseModel

Indicates something went wrong during the request.

Source code in wom/models/http.py
@attrs.define
class HttpErrorResponse(BaseModel):
    """Indicates something went wrong during the request."""

    status: int
    """The HTTP status code."""

    message: str
    """The error message."""

message class-attribute

message: str

The error message.

status class-attribute

status: int

The HTTP status code.

HttpSuccessResponse

Bases: BaseModel

Indicates a successful HTTP response.

Source code in wom/models/http.py
@attrs.define
class HttpSuccessResponse(BaseModel):
    """Indicates a successful HTTP response."""

    status: int
    """The HTTP status code."""

    message: str
    """The success message."""

message class-attribute

message: str

The success message.

status class-attribute

status: int

The HTTP status code.

Membership

Bases: BaseModel

Represents a membership in a group.

Source code in wom/models/groups/models.py
@attrs.define(init=False)
class Membership(BaseModel):
    """Represents a membership in a group."""

    player_id: int
    """The unique ID of the player in this membership."""

    group_id: int
    """The group ID this membership belongs to."""

    role: GroupRole | None
    """The optional [`GroupRole`][wom.GroupRole] for this membership."""

    created_at: datetime
    """The date this membership was created."""

    updated_at: datetime
    """The date this membership was updated."""

created_at class-attribute

created_at: datetime

The date this membership was created.

group_id class-attribute

group_id: int

The group ID this membership belongs to.

player_id class-attribute

player_id: int

The unique ID of the player in this membership.

role class-attribute

role: GroupRole | None

The optional GroupRole for this membership.

updated_at class-attribute

updated_at: datetime

The date this membership was updated.

MetricLeaders

Bases: BaseModel

The leaders for each metric in a group.

Source code in wom/models/groups/models.py
@attrs.define(init=False)
class MetricLeaders(BaseModel):
    """The leaders for each metric in a group."""

    skills: dict[enums.Skills, SkillLeader]
    """A mapping of [`Skills`][wom.Skills] keys to [`SkillLeader`]
    [wom.SkillLeader] values.
    """

    bosses: dict[enums.Bosses, BossLeader]
    """A mapping of [`Bosses`][wom.Bosses] keys to [`BossLeader`]
    [wom.BossLeader] values.
    """

    activities: dict[enums.Activities, ActivityLeader]
    """A mapping of [`Activities`][wom.Activities] keys to [`ActivityLeader`]
    [wom.ActivityLeader] values.
    """

    computed: dict[enums.ComputedMetrics, ComputedMetricLeader]
    """A mapping of [`ComputedMetrics`][wom.ComputedMetrics] keys to
    [`ComputedMetricLeader`][wom.ComputedMetricLeader] values.
    """

activities class-attribute

activities: dict[enums.Activities, ActivityLeader]

A mapping of Activities keys to ActivityLeader values.

bosses class-attribute

bosses: dict[enums.Bosses, BossLeader]

A mapping of Bosses keys to BossLeader values.

computed class-attribute

computed: dict[enums.ComputedMetrics, ComputedMetricLeader]

A mapping of ComputedMetrics keys to ComputedMetricLeader values.

skills class-attribute

skills: dict[enums.Skills, SkillLeader]

A mapping of Skills keys to SkillLeader values.

NameChange

Bases: BaseModel

Represents a player name change.

Source code in wom/models/names/models.py
@attrs.define(init=False)
class NameChange(BaseModel):
    """Represents a player name change."""

    id: int
    """The unique ID of this name change."""

    player_id: int
    """The player ID associated with the name change."""

    old_name: str
    """The old username of the player."""

    new_name: str
    """The new username of the player."""

    status: NameChangeStatus
    """The [`status`][wom.NameChangeStatus] of the name change."""

    resolved_at: datetime | None
    """The date the name change was approved or denied."""

    updated_at: datetime
    """The date the name change was updated."""

    created_at: datetime
    """The date the name change was created."""

created_at class-attribute

created_at: datetime

The date the name change was created.

id class-attribute

id: int

The unique ID of this name change.

new_name class-attribute

new_name: str

The new username of the player.

old_name class-attribute

old_name: str

The old username of the player.

player_id class-attribute

player_id: int

The player ID associated with the name change.

resolved_at class-attribute

resolved_at: datetime | None

The date the name change was approved or denied.

status class-attribute

status: NameChangeStatus

The status of the name change.

updated_at class-attribute

updated_at: datetime

The date the name change was updated.

NameChangeData

Bases: BaseModel

Metadata associated with a name change.

Source code in wom/models/names/models.py
@attrs.define(init=False)
class NameChangeData(BaseModel):
    """Metadata associated with a name change."""

    is_new_on_hiscores: bool
    """Whether or not he new username is on the hiscores."""

    is_old_on_hiscores: bool
    """Whether or not he old username is on the hiscores."""

    is_new_tracked: bool
    """Whether or not he new username is tracked on WOM."""

    has_negative_gains: bool
    """Whether or not name change has negative XP gains."""

    time_diff: int
    """Milliseconds between old names last snapshot and new names
    first snapshot or the name change submission date if not tracked.
    """

    hours_diff: int
    """Hours between old names last snapshot and new names first
    snapshot or the name change submission date if not tracked.
    """

    ehp_diff: int
    """The difference in efficient hours played between the old and new
    usernames.
    """

    ehb_diff: int
    """The difference in efficient hours bossed between the old and new
    usernames.
    """

    old_stats: Snapshot
    """The latest [`Snapshot`][wom.Snapshot] for the old name."""

    new_stats: Snapshot | None
    """The new name's first [`Snapshot`][wom.Snapshot], current hiscores
    stats if untracked or `None`` if untracked and not present on
    hiscores.
    """

ehb_diff class-attribute

ehb_diff: int

The difference in efficient hours bossed between the old and new usernames.

ehp_diff class-attribute

ehp_diff: int

The difference in efficient hours played between the old and new usernames.

has_negative_gains class-attribute

has_negative_gains: bool

Whether or not name change has negative XP gains.

hours_diff class-attribute

hours_diff: int

Hours between old names last snapshot and new names first snapshot or the name change submission date if not tracked.

is_new_on_hiscores class-attribute

is_new_on_hiscores: bool

Whether or not he new username is on the hiscores.

is_new_tracked class-attribute

is_new_tracked: bool

Whether or not he new username is tracked on WOM.

is_old_on_hiscores class-attribute

is_old_on_hiscores: bool

Whether or not he old username is on the hiscores.

new_stats class-attribute

new_stats: Snapshot | None

The new name's first Snapshot, current hiscores stats if untracked or `None`` if untracked and not present on hiscores.

old_stats class-attribute

old_stats: Snapshot

The latest Snapshot for the old name.

time_diff class-attribute

time_diff: int

Milliseconds between old names last snapshot and new names first snapshot or the name change submission date if not tracked.

NameChangeDetail

Bases: BaseModel

Details regarding a name change.

Source code in wom/models/names/models.py
@attrs.define(init=False)
class NameChangeDetail(BaseModel):
    """Details regarding a name change."""

    name_change: NameChange
    """The [`NameChange`][wom.NameChange] itself."""

    data: NameChangeData | None
    """The [`NameChangeData`][wom.NameChangeData] for this name change.

    !!! note

        This will be `None` when the name change is not pending.
    """

data class-attribute

data: NameChangeData | None

The NameChangeData for this name change.

Note

This will be None when the name change is not pending.

name_change class-attribute

name_change: NameChange

The NameChange itself.

NameChangeStatus

Bases: BaseEnum

The available name change statuses.

Source code in wom/models/names/enums.py
class NameChangeStatus(BaseEnum):
    """The available name change statuses."""

    Pending = "pending"
    Approved = "approved"
    Denied = "denied"

Participation

Bases: BaseModel

Represents participation in a competition.

Source code in wom/models/competitions/models.py
@attrs.define(init=False)
class Participation(BaseModel):
    """Represents participation in a competition."""

    player_id: int
    """The ID of the player associated with this participation."""

    competition_id: int
    """The ID of the competition associated with this participation."""

    team_name: str | None
    """The optional team name associated with this participation."""

    created_at: datetime
    """The date this participation was created."""

    updated_at: datetime
    """The date this participation was updated."""

competition_id class-attribute

competition_id: int

The ID of the competition associated with this participation.

created_at class-attribute

created_at: datetime

The date this participation was created.

player_id class-attribute

player_id: int

The ID of the player associated with this participation.

team_name class-attribute

team_name: str | None

The optional team name associated with this participation.

updated_at class-attribute

updated_at: datetime

The date this participation was updated.

Player

Bases: BaseModel

Represents a player on WOM.

Source code in wom/models/players/models.py
@attrs.define(init=False)
class Player(BaseModel):
    """Represents a player on WOM."""

    id: int
    """The players unique ID."""

    username: str
    """The players username, always lowercase and 1-12 chars."""

    display_name: str
    """The players display name, supports capitalization ."""

    type: PlayerType
    """The [`PlayerType`][wom.PlayerType] for this player."""

    build: PlayerBuild
    """The [`PlayerBuild`][wom.PlayerBuild] for this player."""

    country: Country | None
    """The players [`Country`][wom.Country] country of origin, if they
    have one set.
    """

    status: PlayerStatus
    """The players status, i.e. flagged, archived, etc."""

    exp: int
    """The players overall experience."""

    ehp: float
    """The players efficient hours played."""

    ehb: float
    """The players efficient hours bossed."""

    ttm: float
    """The players time to max, in hours."""

    tt200m: float
    """The players time to 200m xp all skills, in hours."""

    registered_at: datetime
    """The date the player was registered with WOM."""

    updated_at: datetime
    """The date the player was last updated with WOM."""

    last_changed_at: datetime | None
    """The date of the players last change (xp gain, boss kc, etc)."""

    last_imported_at: datetime | None
    """The date of the last player history import."""

build class-attribute

build: PlayerBuild

The PlayerBuild for this player.

country class-attribute

country: Country | None

The players Country country of origin, if they have one set.

display_name class-attribute

display_name: str

The players display name, supports capitalization .

ehb class-attribute

ehb: float

The players efficient hours bossed.

ehp class-attribute

ehp: float

The players efficient hours played.

exp class-attribute

exp: int

The players overall experience.

id class-attribute

id: int

The players unique ID.

last_changed_at class-attribute

last_changed_at: datetime | None

The date of the players last change (xp gain, boss kc, etc).

last_imported_at class-attribute

last_imported_at: datetime | None

The date of the last player history import.

registered_at class-attribute

registered_at: datetime

The date the player was registered with WOM.

status class-attribute

status: PlayerStatus

The players status, i.e. flagged, archived, etc.

tt200m class-attribute

tt200m: float

The players time to 200m xp all skills, in hours.

ttm class-attribute

ttm: float

The players time to max, in hours.

type class-attribute

type: PlayerType

The PlayerType for this player.

updated_at class-attribute

updated_at: datetime

The date the player was last updated with WOM.

username class-attribute

username: str

The players username, always lowercase and 1-12 chars.

PlayerAchievementProgress

Bases: BaseModel

Represents a players progress toward an achievement.

Source code in wom/models/players/models.py
@attrs.define(init=False)
class PlayerAchievementProgress(BaseModel):
    """Represents a players progress toward an achievement."""

    achievement: AchievementProgress
    """The [AchievementProgress][wom.AchievementProgress] made."""

    current_value: int
    """The current value for the achievement's metric."""

    absolute_progress: float
    """The players current absolute progress toward the achievement.

    Scale of 0-1 with 1 being 100% progress.
    """

    relative_progress: float
    """The players current relative progress toward the achievement
    starting from the previous achievement.

    Scale of 0-1 with 1 being 100% progress.
    """

absolute_progress class-attribute

absolute_progress: float

The players current absolute progress toward the achievement.

Scale of 0-1 with 1 being 100% progress.

achievement class-attribute

achievement: AchievementProgress

current_value class-attribute

current_value: int

The current value for the achievement's metric.

relative_progress class-attribute

relative_progress: float

The players current relative progress toward the achievement starting from the previous achievement.

Scale of 0-1 with 1 being 100% progress.

PlayerBuild

Bases: BaseEnum

Potential account builds.

Source code in wom/models/players/enums.py
class PlayerBuild(BaseEnum):
    """Potential account builds."""

    Main = "main"
    F2p = "f2p"
    Lvl3 = "lvl3"
    Zerker = "zerker"
    Def1 = "def1"
    Hp10 = "hp10"

PlayerCompetitionStanding

Bases: BaseModel

Represents a players standing in a competition.

Source code in wom/models/competitions/models.py
@attrs.define(init=False)
class PlayerCompetitionStanding(BaseModel):
    """Represents a players standing in a competition."""

    participation: PlayerParticipation
    """The [`PlayerParticipation`][wom.PlayerParticipation] achieved by
    the player.
    """

    progress: CompetitionProgress
    """The [`CompetitionProgress`][wom.CompetitionProgress] that was
    made.
    """

    rank: int
    """The rank in the competition standings."""

participation class-attribute

participation: PlayerParticipation

The PlayerParticipation achieved by the player.

progress class-attribute

progress: CompetitionProgress

The CompetitionProgress that was made.

rank class-attribute

rank: int

The rank in the competition standings.

PlayerDetail

Bases: BaseModel

Represents details about a player.

Source code in wom/models/players/models.py
@attrs.define(init=False)
class PlayerDetail(BaseModel):
    """Represents details about a player."""

    player: Player
    """The [Player][wom.Player]."""

    combat_level: int
    """The players combat level."""

    latest_snapshot: Snapshot | None
    """The latest snapshot for the player, if there is one."""

combat_level class-attribute

combat_level: int

The players combat level.

latest_snapshot class-attribute

latest_snapshot: Snapshot | None

The latest snapshot for the player, if there is one.

player class-attribute

player: Player

The Player.

PlayerGains

Bases: BaseModel

Gains made by a player.

Source code in wom/models/players/models.py
@attrs.define(init=False)
class PlayerGains(BaseModel):
    """Gains made by a player."""

    starts_at: datetime
    """The date the gains started at."""

    ends_at: datetime
    """The date the gains ended at."""

    data: PlayerGainsData
    """The [`PlayerGainsData`][wom.PlayerGainsData] for the player."""

data class-attribute

data: PlayerGainsData

The PlayerGainsData for the player.

ends_at class-attribute

ends_at: datetime

The date the gains ended at.

starts_at class-attribute

starts_at: datetime

The date the gains started at.

PlayerGainsData

Bases: BaseModel

Contains all the player gains data.

Source code in wom/models/players/models.py
@attrs.define(init=False)
class PlayerGainsData(BaseModel):
    """Contains all the player gains data."""

    skills: dict[enums.Skills, SkillGains]
    """A mapping of [`Skills`][wom.Skills] keys to [`SkillGains`]
    [wom.SkillGains] values.
    """

    bosses: dict[enums.Bosses, BossGains]
    """A mapping of [`Bosses`][wom.Bosses] keys to [`BossGains`]
    [wom.BossGains] values.
    """

    activities: dict[enums.Activities, ActivityGains]
    """A mapping of [`Activities`][wom.Activities] keys to [`ActivityGains`]
    [wom.ActivityGains] values.
    """

    computed: dict[enums.ComputedMetrics, ComputedGains]
    """A mapping of [`ComputedMetrics`][wom.ComputedMetrics] keys to
    [`ComputedGains`] [wom.ComputedGains] values.
    """

activities class-attribute

activities: dict[enums.Activities, ActivityGains]

A mapping of Activities keys to ActivityGains values.

bosses class-attribute

bosses: dict[enums.Bosses, BossGains]

A mapping of Bosses keys to BossGains values.

computed class-attribute

computed: dict[enums.ComputedMetrics, ComputedGains]

A mapping of ComputedMetrics keys to ComputedGains values.

skills class-attribute

skills: dict[enums.Skills, SkillGains]

A mapping of Skills keys to SkillGains values.

PlayerMembership

Bases: BaseModel

Represents a player membership.

Source code in wom/models/groups/models.py
@attrs.define(init=False)
class PlayerMembership(BaseModel):
    """Represents a player membership."""

    group: Group
    """The [`Group`][wom.Group] the player is a member of."""

    membership: Membership
    """The [`Membership`][wom.Membership] itself."""

group class-attribute

group: Group

The Group the player is a member of.

membership class-attribute

membership: Membership

The Membership itself.

PlayerParticipation

Bases: BaseModel

Represents a players participation in a competition.

Source code in wom/models/competitions/models.py
@attrs.define(init=False)
class PlayerParticipation(BaseModel):
    """Represents a players participation in a competition."""

    data: Participation
    """The [`Participation`][wom.Participation] the player achieved."""

    competition: Competition
    """The [`Competition`][wom.Competition] that the player participated
    in.
    """

competition class-attribute

competition: Competition

The Competition that the player participated in.

data class-attribute

data: Participation

The Participation the player achieved.

PlayerStatus

Bases: BaseEnum

Status for the players account.

Source code in wom/models/players/enums.py
class PlayerStatus(BaseEnum):
    """Status for the players account."""

    Active = "active"
    Unranked = "unranked"
    Flagged = "flagged"
    Archived = "archived"

PlayerType

Bases: BaseEnum

Different types of players.

Source code in wom/models/players/enums.py
class PlayerType(BaseEnum):
    """Different types of players."""

    Unknown = "unknown"
    Regular = "regular"
    Ironman = "ironman"
    Hardcore = "hardcore"
    Ultimate = "ultimate"
    FreshStart = "fresh_start"

Record

Bases: BaseModel

Represents a record held by a player.

Source code in wom/models/records/models.py
@attrs.define(init=False)
class Record(BaseModel):
    """Represents a record held by a player."""

    id: int
    """The unique ID for this record."""

    player_id: int
    """The player ID associated with this record."""

    period: enums.Period
    """The [`Period`][wom.Period] over which this record was achieved."""

    metric: enums.Metric
    """The [`Metric`][wom.Metric] measured in this record."""

    value: int
    """The records gained value."""

    updated_at: datetime
    """The records creation/modification date."""

id class-attribute

id: int

The unique ID for this record.

metric class-attribute

metric: enums.Metric

The Metric measured in this record.

period class-attribute

period: enums.Period

The Period over which this record was achieved.

player_id class-attribute

player_id: int

The player ID associated with this record.

updated_at class-attribute

updated_at: datetime

The records creation/modification date.

value class-attribute

value: int

The records gained value.

RecordLeaderboardEntry

Bases: BaseModel

Represents a player's record leaderboard entry.

Source code in wom/models/records/models.py
@attrs.define(init=False)
class RecordLeaderboardEntry(BaseModel):
    """Represents a player's record leaderboard entry."""

    player: Player
    """The [`Player`][wom.Player] holding this leaderboard entry."""

    record: Record
    """The [`Record`][wom.Record] tied to this leaderboard entry."""

player class-attribute

player: Player

The Player holding this leaderboard entry.

record class-attribute

record: Record

The Record tied to this leaderboard entry.

Skill

Bases: BaseModel

Details regarding a particular skill.

Source code in wom/models/players/models.py
@attrs.define(init=False)
class Skill(BaseModel):
    """Details regarding a particular skill."""

    metric: enums.Skills
    """The [`Skills`][wom.Skills] being measured."""

    rank: int
    """The players rank in the skill."""

    level: int
    """The players level in the skill."""

    experience: int
    """The players experience in the skill."""

    ehp: float
    """The players efficient hours played for the skill."""

ehp class-attribute

ehp: float

The players efficient hours played for the skill.

experience class-attribute

experience: int

The players experience in the skill.

level class-attribute

level: int

The players level in the skill.

metric class-attribute

metric: enums.Skills

The Skills being measured.

rank class-attribute

rank: int

The players rank in the skill.

SkillGains

Bases: BaseModel

Represents skill gains made by a player.

Source code in wom/models/players/models.py
@attrs.define(init=False)
class SkillGains(BaseModel):
    """Represents skill gains made by a player."""

    metric: enums.Skills
    """The [`Skills`][wom.Skills] being measured."""

    experience: Gains
    """The experience [`Gains`][wom.Gains]."""

    ehp: Gains
    """The efficient hours played [`Gains`][wom.Gains]."""

    rank: Gains
    """The rank [`Gains`][wom.Gains]."""

    level: Gains
    """The level [`Gains`][wom.Gains]."""

ehp class-attribute

ehp: Gains

The efficient hours played Gains.

experience class-attribute

experience: Gains

The experience Gains.

level class-attribute

level: Gains

The level Gains.

metric class-attribute

metric: enums.Skills

The Skills being measured.

rank class-attribute

rank: Gains

The rank Gains.

SkillLeader

Bases: BaseModel

Represents a leader in a particular skill.

Source code in wom/models/groups/models.py
@attrs.define(init=False)
class SkillLeader(BaseModel):
    """Represents a leader in a particular skill."""

    metric: enums.Skills
    """The [`Skills`][wom.Skills] being measured."""

    rank: int
    """The players rank in the skill."""

    level: int
    """The players level in the skill."""

    experience: int
    """The players experience in the skill."""

    player: Player
    """The player leading in this metric."""

experience class-attribute

experience: int

The players experience in the skill.

level class-attribute

level: int

The players level in the skill.

metric class-attribute

metric: enums.Skills

The Skills being measured.

player class-attribute

player: Player

The player leading in this metric.

rank class-attribute

rank: int

The players rank in the skill.

Snapshot

Bases: BaseModel

Represents a player snapshot.

Source code in wom/models/players/models.py
@attrs.define(init=False)
class Snapshot(BaseModel):
    """Represents a player snapshot."""

    id: int
    """The unique ID of the snapshot."""

    player_id: int
    """The unique ID of the player for this snapshot."""

    imported_at: datetime | None
    """The date the snapshot was imported, if it was."""

    data: SnapshotData
    """The [`SnapshotData`][wom.SnapshotData] for the snapshot."""

    created_at: datetime
    """The date the snapshot was created."""

created_at class-attribute

created_at: datetime

The date the snapshot was created.

data class-attribute

data: SnapshotData

The SnapshotData for the snapshot.

id class-attribute

id: int

The unique ID of the snapshot.

imported_at class-attribute

imported_at: datetime | None

The date the snapshot was imported, if it was.

player_id class-attribute

player_id: int

The unique ID of the player for this snapshot.

SnapshotData

Bases: BaseModel

The data associated with this snapshot.

Source code in wom/models/players/models.py
@attrs.define(init=False)
class SnapshotData(BaseModel):
    """The data associated with this snapshot."""

    skills: dict[enums.Skills, Skill]
    """A mapping of [`Skills`][wom.Skills] keys to [`Skill`][wom.Skill] values
    from this snapshot.
    """

    bosses: dict[enums.Bosses, Boss]
    """A mapping of [`Bosses`][wom.Bosses] keys to [`Boss`][wom.Boss] values
    from this snapshot.
    """

    activities: dict[enums.Activities, Activity]
    """A mapping of [`Activities`][wom.Activities] keys to [`Activity`]
    [wom.Activity] values from this snapshot.
    """

    computed: dict[enums.ComputedMetrics, ComputedMetric]
    """A mapping of [`ComputedMetrics`][wom.ComputedMetrics] keys to
    [`ComputedMetric`][wom.ComputedMetric] values from this snapshot.
    """

activities class-attribute

activities: dict[enums.Activities, Activity]

A mapping of Activities keys to Activity values from this snapshot.

bosses class-attribute

bosses: dict[enums.Bosses, Boss]

A mapping of Bosses keys to Boss values from this snapshot.

computed class-attribute

computed: dict[enums.ComputedMetrics, ComputedMetric]

A mapping of ComputedMetrics keys to ComputedMetric values from this snapshot.

skills class-attribute

skills: dict[enums.Skills, Skill]

A mapping of Skills keys to Skill values from this snapshot.

Team

Bases: BaseModel

Represents a competition team.

Parameters:

Name Type Description Default
name str

The name of the team.

required
participants list[str]

A list of usernames to include in the team.

required

Tip

This is a model class that you will create in order to send data to some endpoints.

Source code in wom/models/competitions/models.py
@attrs.define
class Team(BaseModel):
    """Represents a competition team.

    Args:
        name: The name of the team.

        participants: A list of usernames to include in the
            team.

    !!! tip

        This is a model class that you will create in order to send
        data to some endpoints.
    """

    def __init__(self, name: str, participants: list[str]) -> None:
        self.name = name
        self.participants = participants

    name: str
    """The name of the team."""

    participants: list[str]
    """A list of participant usernames on the team."""

name class-attribute instance-attribute

name: str

The name of the team.

participants class-attribute instance-attribute

participants: list[str]

A list of participant usernames on the team.

Top5ProgressResult

Bases: BaseModel

A top 5 progress result for a competition.

Source code in wom/models/competitions/models.py
@attrs.define(init=False)
class Top5ProgressResult(BaseModel):
    """A top 5 progress result for a competition."""

    player: Player
    """The [`Player`][wom.Player] who made top 5 progress."""

    history: list[CompetitionHistoryDataPoint]
    """A list of [CompetitionHistoryDataPoints]
    [wom.CompetitionHistoryDataPoint] making up the history
    of this top 5 progress result.
    """

history class-attribute

history: list[CompetitionHistoryDataPoint]

A list of CompetitionHistoryDataPoints making up the history of this top 5 progress result.

player class-attribute

player: Player

The Player who made top 5 progress.