Skip to main content

Asynchronous, feature-rich and easy to use Python wrapper for Public Wynncraft API

Project description

corkus banner

pypi GitHub Workflow Status docs build Codecov python version downloads

Corkus.py ⚙️

[!CAUTION] Corkus.py is no longer maintained

Due to recent changes in the Wynncraft API, Corkus.py is no longer working and will not receive further updates or support. Some endpoints based on the v2 API may still be operational, but those relying on the now-removed v1 API and new v3 API are no longer functioning. Additionally, more features may become broken in the future.

I'm unable to recommend any other Python-based wrapper for the Wynncraft API - I don't see any good alternatives. It is strongly advised to not use this project anymore due to its outdated and non-functional state.

Thank you to all users and contributors for your support and feedback throughout the lifespan of this project.

Asynchronous, feature-rich and easy to use Python wrapper for Public Wynncraft API.

Key Features

  • Modern asynchronous API using async/await syntax.
  • Easy to use with an object oriented design using fetch and helper functions.
  • 100% coverage of the Wynncraft API.
  • Proper rate limit handling that prevents 429s.
  • Responses caching to improve speed.

Installation

Python 3.8+ or higher is required

pip install corkus.py

Or install latest development version:

pip install --upgrade git+https://github.com/MrBartusek/corkus.py@main

See documentation for more information.

Quick Example

Using Context Manager:

import asyncio
from corkus import Corkus

async def player_stats():
    async with Corkus() as corkus:
        player = await corkus.player.get("MrBartusekXD")
        character = player.best_character
        print(f"username: {player.username}")
        print(f"best character: {character.display_name} ({character.combat.level}lv)")

loop = asyncio.get_event_loop()
loop.run_until_complete(player_stats())

Without Context Manager:

import asyncio
from corkus import Corkus

async def player_stats():
    corkus = Corkus()
    await corkus.start()

    player = await corkus.player.get("MrBartusekXD")
    character = player.best_character
    print(f"username: {player.username}")
    print(f"best character: {character.display_name} ({character.combat.level}lv)")

    await corkus.close()

loop = asyncio.get_event_loop()
loop.run_until_complete(player_stats())

Output:

username: MrBartusek
best character: Mage (102lv)

Contributing

Want to contribute to the project?

First of all, thanks! Check contributing guidelines for more information.

Links

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

corkus_py-3.1.0.tar.gz (51.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

corkus.py-3.1.0-py3-none-any.whl (70.3 kB view details)

Uploaded Python 3

File details

Details for the file corkus_py-3.1.0.tar.gz.

File metadata

  • Download URL: corkus_py-3.1.0.tar.gz
  • Upload date:
  • Size: 51.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.12.3

File hashes

Hashes for corkus_py-3.1.0.tar.gz
Algorithm Hash digest
SHA256 2deaa20ecf96f73342ac34619786f02678f3fb39cd99b0b5a0cf9c83883398bc
MD5 23dfd7bd59b626f2f2bd99c4c4913260
BLAKE2b-256 e2de577880744727d9185138eb97da99e0335bd1946a0e28ee05e3ed6e028ab5

See more details on using hashes here.

File details

Details for the file corkus.py-3.1.0-py3-none-any.whl.

File metadata

  • Download URL: corkus.py-3.1.0-py3-none-any.whl
  • Upload date:
  • Size: 70.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.12.3

File hashes

Hashes for corkus.py-3.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 c51418647fb8ec5dddbe985cb5ab754f7c57d536328b4a7a87e078a9ad226f7a
MD5 fbd2e400c9de570ea2517f2afea5e1ec
BLAKE2b-256 7937f96e905d245c30c247ae9e53c6375e0b0daa5924a45f0255c51351f98e64

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page