A simple wrapper for the Wynncraft API, with caching.
Requires at least python 3.6
pip install wynncraft- All information returned in JSON format.
- For incorrect inputs
ValueErroris raised. - To disable caching, set
CACHE_TIMEto0
| Constant | Type | Descrpition | Default Value |
|---|---|---|---|
API_KEY |
String | Your API key. (Not required, but recommended) | "" |
CACHE_TIME |
Nubmer | How long does a cached response is usable. | 300 |
RATE_LIMITER |
Boolean | Enables the rate limiter. | True |
REGEX_CHECK |
Boolean | Checks the syntax of the argument. | True |
TIMEOUT |
Number | Specifies a timeout in seconds for http request. | 10 |
wynncraft.Guild.list()wynncraft.Guild.stats("Wynncraft")wynncraft.Ingredient.get("apple")wynncraft.Ingredient.list()# Valid queries: name, tier, level, skills, sprite, identifications, itemOnlyIDs, consumableOnlyIDs
wynncraft.Ingredient.search(query, arg)# Same as Ingredient.search("name", arg)
wynncraft.Ingredient.search_name(arg)# Same as Ingredient.search("tier", arg)
wynncraft.Ingredient.search_tier(arg)# Same as Ingredient.search("level", arg)
wynncraft.Ingredient.search_level(arg)# Same as Ingredient.search("skills", arg)
wynncraft.Ingredient.search_skills(arg)# Same as Ingredient.search("sprite", arg)
wynncraft.Ingredient.search_sprite(arg)# Same as Ingredient.search("identifications", arg)
wynncraft.Ingredient.search_identifications(arg)# Same as Ingredient.search("itemOnlyIDs", arg)
wynncraft.Ingredient.search_item_only_ids(arg)# Same as Ingredient.search("consumableOnlyIDs", arg)
wynncraft.Ingredient.search_consumable_only_ids(arg)# Valid categories: all, boots, bow, bracelet, chestplate, dagger, helmet, leggings, necklace, ring, spear, wand
wynncraft.Item.database_category(all)wynncraft.Item.database_search("Idol")wynncraft.Leaderboard.guild(timeframe)wynncraft.Leaderboard.player(timeframe)wynncraft.Leaderboard.pvp(timeframe)wynncraft.Network.server_list()wynncraft.Network.player_sum()wynncraft.Player.stats("Salted")wynncraft.Player.uuid("Salted")wynncraft.Recipe.get("Boots-1-3")wynncraft.Recipe.list()# Valid queries: type, skill, level, durability, healthOrDamage, duration, basicDuration
wynncraft.Recipe.search(query, arg)# Same as Recipe.search("type", arg)
wynncraft.Recipe.search_type(arg)# Same as Recipe.search("skill", arg)
wynncraft.Recipe.search_skill(arg)# Same as Recipe.search("level", arg)
wynncraft.Recipe.search_level(arg)# Same as Recipe.search("durability", arg)
wynncraft.Recipe.search_durability(arg)# Same as Recipe.search("healthOrDamage", arg)
wynncraft.Recipe.search_health_or_damage(arg)# Same as Recipe.search("duration", arg)
wynncraft.Recipe.search_duration(arg)# Same as Recipe.search("basicDuration", arg)
wynncraft.Recipe.search_basic_duration(arg)wynncraft.Search.name("Salted")wynncraft.Territory.list()After official documentation, these will be moved to the appropriate classes. Undocumented, subject to name change or removal. These return lists not dicts.
wynncraft.Extra.latest_news()wynncraft.Extra.latest_tweets()Undocumented, subject to name change or removal.
wynncraft.Extra.gathering_spots()wynncraft.Extra.server_list()