Skip to content

enums

Global enums used throughout the project.

Activities module-attribute

Activities: FrozenSet[Metric] = frozenset(
    {
        LeaguePoints,
        BountyHunterHunter,
        BountyHunterRogue,
        ClueScrollsAll,
        ClueScrollsBeginner,
        ClueScrollsEasy,
        ClueScrollsMedium,
        ClueScrollsHard,
        ClueScrollsElite,
        ClueScrollsMaster,
        ColosseumGlory,
        LastManStanding,
        PvpArena,
        SoulWarsZeal,
        GuardiansOfTheRift,
    }
)

Set containing activities.

Bosses module-attribute

Bosses: FrozenSet[Metric] = frozenset(
    {
        AbyssalSire,
        AlchemicalHydra,
        Araxxor,
        Artio,
        BarrowsChests,
        Bryophyta,
        Callisto,
        Calvarion,
        Cerberus,
        ChambersOfXeric,
        ChambersOfXericChallenge,
        ChaosElemental,
        ChaosFanatic,
        CommanderZilyana,
        CorporealBeast,
        CrazyArchaeologist,
        DagannothPrime,
        DagannothRex,
        DagannothSupreme,
        DerangedArchaeologist,
        DukeSucellus,
        GeneralGraardor,
        GiantMole,
        GrotesqueGuardians,
        Hespori,
        KalphiteQueen,
        KingBlackDragon,
        Kraken,
        Kreearra,
        KrilTsutsaroth,
        LunarChests,
        Mimic,
        Nex,
        Nightmare,
        PhosanisNightmare,
        Obor,
        PhantomMuspah,
        Sarachnis,
        Scorpia,
        Scurrius,
        Skotizo,
        SolHeredit,
        Spindel,
        Tempoross,
        TheGauntlet,
        TheCorruptedGauntlet,
        TheLeviathan,
        TheWhisperer,
        TheatreOfBlood,
        TheatreOfBloodHard,
        ThermonuclearSmokeDevil,
        TombsOfAmascut,
        TombsOfAmascutExpert,
        TzKalZuk,
        TzTokJad,
        Vardorvis,
        Venenatis,
        Vetion,
        Vorkath,
        Wintertodt,
        Zalcano,
        Zulrah,
    }
)

Set containing bosses.

ComputedMetrics module-attribute

ComputedMetrics: FrozenSet[Metric] = frozenset({Ehp, Ehb})

Set containing all the types of computed metrics.

Skills module-attribute

Skills: FrozenSet[Metric] = frozenset(
    {
        Overall,
        Attack,
        Defence,
        Strength,
        Hitpoints,
        Ranged,
        Prayer,
        Magic,
        Cooking,
        Woodcutting,
        Fletching,
        Fishing,
        Firemaking,
        Crafting,
        Smithing,
        Mining,
        Herblore,
        Agility,
        Thieving,
        Slayer,
        Farming,
        Runecrafting,
        Hunter,
        Construction,
    }
)

Set containing skills.

BaseEnum

Bases: Enum

The base enum all library enums inherit from.

Source code in wom/enums.py
class BaseEnum(Enum):
    """The base enum all library enums inherit from."""

    def __str__(self) -> str:
        return self.value  # type: ignore[no-any-return]

    def __eq__(self, other: object) -> bool:
        if isinstance(other, BaseEnum):
            return self.value == other.value  # type: ignore[no-any-return]

        if isinstance(other, str):
            return self.value == other  # type: ignore[no-any-return]

        return super().__eq__(other)

    def __hash__(self) -> int:
        return hash(self.value)

    @classmethod
    def at_random(cls: t.Type[T]) -> T:
        """Generates a random variant of this enum.

        Returns:
            The randomly generated enum.
        """
        return random.choice(tuple(cls))

at_random classmethod

at_random() -> T

Generates a random variant of this enum.

Returns:

Type Description
T

The randomly generated enum.

Source code in wom/enums.py
@classmethod
def at_random(cls: t.Type[T]) -> T:
    """Generates a random variant of this enum.

    Returns:
        The randomly generated enum.
    """
    return random.choice(tuple(cls))

Metric

Bases: BaseEnum

Represents all metrics including skills, bosses, activities, and computed metrics.

Source code in wom/enums.py
class Metric(BaseEnum):
    """Represents all metrics including skills, bosses, activities, and
    computed metrics.
    """

    # Skills
    Overall = "overall"
    Attack = "attack"
    Defence = "defence"
    Strength = "strength"
    Hitpoints = "hitpoints"
    Ranged = "ranged"
    Prayer = "prayer"
    Magic = "magic"
    Cooking = "cooking"
    Woodcutting = "woodcutting"
    Fletching = "fletching"
    Fishing = "fishing"
    Firemaking = "firemaking"
    Crafting = "crafting"
    Smithing = "smithing"
    Mining = "mining"
    Herblore = "herblore"
    Agility = "agility"
    Thieving = "thieving"
    Slayer = "slayer"
    Farming = "farming"
    Runecrafting = "runecrafting"
    Hunter = "hunter"
    Construction = "construction"

    # Activities
    LeaguePoints = "league_points"
    BountyHunterHunter = "bounty_hunter_hunter"
    BountyHunterRogue = "bounty_hunter_rogue"
    ClueScrollsAll = "clue_scrolls_all"
    ClueScrollsBeginner = "clue_scrolls_beginner"
    ClueScrollsEasy = "clue_scrolls_easy"
    ClueScrollsMedium = "clue_scrolls_medium"
    ClueScrollsHard = "clue_scrolls_hard"
    ClueScrollsElite = "clue_scrolls_elite"
    ClueScrollsMaster = "clue_scrolls_master"
    ColosseumGlory = "colosseum_glory"
    LastManStanding = "last_man_standing"
    PvpArena = "pvp_arena"
    SoulWarsZeal = "soul_wars_zeal"
    GuardiansOfTheRift = "guardians_of_the_rift"

    # Bosses
    AbyssalSire = "abyssal_sire"
    AlchemicalHydra = "alchemical_hydra"
    Araxxor = "araxxor"
    Artio = "artio"
    BarrowsChests = "barrows_chests"
    Bryophyta = "bryophyta"
    Callisto = "callisto"
    Calvarion = "calvarion"
    Cerberus = "cerberus"
    ChambersOfXeric = "chambers_of_xeric"
    ChambersOfXericChallenge = "chambers_of_xeric_challenge_mode"
    ChaosElemental = "chaos_elemental"
    ChaosFanatic = "chaos_fanatic"
    CommanderZilyana = "commander_zilyana"
    CorporealBeast = "corporeal_beast"
    CrazyArchaeologist = "crazy_archaeologist"
    DagannothPrime = "dagannoth_prime"
    DagannothRex = "dagannoth_rex"
    DagannothSupreme = "dagannoth_supreme"
    DerangedArchaeologist = "deranged_archaeologist"
    DukeSucellus = "duke_sucellus"
    GeneralGraardor = "general_graardor"
    GiantMole = "giant_mole"
    GrotesqueGuardians = "grotesque_guardians"
    Hespori = "hespori"
    KalphiteQueen = "kalphite_queen"
    KingBlackDragon = "king_black_dragon"
    Kraken = "kraken"
    Kreearra = "kreearra"
    KrilTsutsaroth = "kril_tsutsaroth"
    LunarChests = "lunar_chests"
    Mimic = "mimic"
    Nex = "nex"
    Nightmare = "nightmare"
    PhosanisNightmare = "phosanis_nightmare"
    Obor = "obor"
    PhantomMuspah = "phantom_muspah"
    Sarachnis = "sarachnis"
    Scorpia = "scorpia"
    Scurrius = "scurrius"
    Skotizo = "skotizo"
    SolHeredit = "sol_heredit"
    Spindel = "spindel"
    Tempoross = "tempoross"
    TheGauntlet = "the_gauntlet"
    TheCorruptedGauntlet = "the_corrupted_gauntlet"
    TheLeviathan = "the_leviathan"
    TheWhisperer = "the_whisperer"
    TheatreOfBlood = "theatre_of_blood"
    TheatreOfBloodHard = "theatre_of_blood_hard_mode"
    ThermonuclearSmokeDevil = "thermonuclear_smoke_devil"
    TombsOfAmascut = "tombs_of_amascut"
    TombsOfAmascutExpert = "tombs_of_amascut_expert"
    TzKalZuk = "tzkal_zuk"
    TzTokJad = "tztok_jad"
    Vardorvis = "vardorvis"
    Venenatis = "venenatis"
    Vetion = "vetion"
    Vorkath = "vorkath"
    Wintertodt = "wintertodt"
    Zalcano = "zalcano"
    Zulrah = "zulrah"

    # Computed Metrics
    Ehp = "ehp"
    Ehb = "ehb"

Period

Bases: BaseEnum

A period of time used by the API.

Source code in wom/enums.py
class Period(BaseEnum):
    """A period of time used by the API."""

    FiveMins = "five_min"
    Day = "day"
    Week = "week"
    Month = "month"
    Year = "year"