Skip to main content

corkus banner

pypi GitHub Workflow Status docs build Codecov python version downloads

Corkus.py ⚙️

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.

Metadata

Release files for corkus.py 3.1.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 corkus.py 3.1.0
File Size Uploaded
corkus_py-3.1.0.tar.gz 51.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for corkus.py 3.1.0
File Interpreter ABI Platform
corkus.py-3.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 121.8 kB

Release files / corkus_py-3.1.0.tar.gz

Download URL corkus_py-3.1.0.tar.gz
Size 51.5 kB
Tags Source
SHA-256 checksum
How to use checksums
2deaa20ecf96f73342ac34619786f02678f3fb39cd99b0b5a0cf9c83883398bc
BLAKE2b-256 checksum
How to use checksums
e2de577880744727d9185138eb97da99e0335bd1946a0e28ee05e3ed6e028ab5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.0.0 CPython/3.12.3

Release files / corkus.py-3.1.0-py3-none-any.whl

Download URL corkus.py-3.1.0-py3-none-any.whl
Size 70.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c51418647fb8ec5dddbe985cb5ab754f7c57d536328b4a7a87e078a9ad226f7a
BLAKE2b-256 checksum
How to use checksums
7937f96e905d245c30c247ae9e53c6375e0b0daa5924a45f0255c51351f98e64
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.0.0 CPython/3.12.3

Release history Release notifications | RSS feed

This release

3.1.0 This release

2 release files

3.0.1

2 release files

3.0.0

2 release files

2.0.0

2 release files

1.2.1

2 release files

1.2.0

2 release files

1.1.0

2 release files

1.0.0

2 release files

0.4.1

2 release files

0.4.0

2 release files

0.3.0

1 release file

0.2.2

1 release file

0.2.1

1 release file

0.2.0

1 release file

0.1.0

1 release file

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