Skip to main content

wynncraft-python

A simple wrapper for the Wynncraft API, with caching.

Install

Requires at least python 3.6

pip install wynncraft

Information

  • All information returned in JSON format.
  • For incorrect inputs ValueError is raised.
  • To disable caching, set CACHE_TIME to 0

Constants

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

Functions

Guild

wynncraft.Guild.list()
wynncraft.Guild.stats("Wynncraft")

Ingredient

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)

Item

# Valid categories: all, boots, bow, bracelet, chestplate, dagger, helmet, leggings, necklace, ring, spear, wand
wynncraft.Item.database_category(all)
wynncraft.Item.database_search("Idol")

Leaderboard

wynncraft.Leaderboard.guild(timeframe)
wynncraft.Leaderboard.player(timeframe)
wynncraft.Leaderboard.pvp(timeframe)

Network

wynncraft.Network.server_list()
wynncraft.Network.player_sum()

Player

wynncraft.Player.stats("Salted")
wynncraft.Player.uuid("Salted")

Recipe

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")

Territory

wynncraft.Territory.list()

Extra

Wynncraft v3 API endpoints

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()

Wynntils API endpoints (not official)

Undocumented, subject to name change or removal.

wynncraft.Extra.gathering_spots()
wynncraft.Extra.server_list()

For more documentation see the Wynncraft API documentation.

Metadata

Release files for wynncraft 2.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for wynncraft 2.0.0
File Size Uploaded Provenance Actions
wynncraft-2.0.0.tar.gz 8.9 kB Without provenance Details for wynncraft-2.0.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for wynncraft 2.0.0
File Interpreter ABI Platform Actions
wynncraft-2.0.0-py3-none-any.whl Python 3 none any Details for wynncraft-2.0.0-py3-none-any.whl

Total release size: 18.3 kB

Release files / wynncraft-2.0.0.tar.gz

Download URL wynncraft-2.0.0.tar.gz
Size 8.9 kB
Tags Source
SHA-256 checksum
How to use checksums
88c5188a1951e26e4b5e1ab2be5d431380bf1a07ba56c9ccba5b8d8be7bfe1f6
BLAKE2b-256 checksum
How to use checksums
e5ced8e1f2c0c039c0e2f387d51e1b4b8f7a77c93af362cfab0df9e0b60c8d32
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.10.5

Release files / wynncraft-2.0.0-py3-none-any.whl

Download URL wynncraft-2.0.0-py3-none-any.whl
Size 9.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
fd3f008986aae1e8cd7732752e01b5cfa776c84291240c41f611c25f9c349433
BLAKE2b-256 checksum
How to use checksums
910f94b149a25eb1907235e7f25b2c47fe441e445dbe44f292d17bd1a43605da
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.10.5

Security for wynncraft 2.0.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page