Skip to main content

pyke

PyPI - Version Documentation

pyke is a thin async Riot API wrapper for League of Legends.

Installation

Install the latest version directly from PyPI:

pip install pyke-lol

You need Python 3.10+


Quickstart

import asyncio

from pyke import Continent, Pyke, exceptions

async def main() -> None:
    # Initialize the API
    async with Pyke("RGAPI-...", timeout=60, print_url=True) as api:
        # Every pyke method follows the same convention as the Riot API
        # For example account/v1/accounts/by-riot-id/{gameName}/{tagLine} becomes:
        account = await api.account.by_riot_id(Continent.EUROPE, "saves", "000")

        print(f"Riot ID: {account['gameName']}#{account['tagLine']}")
        print(f"PUUID:   {account['puuid']}")

        # pyke throws typed exceptions matching Riot API error codes
        try:
            region = await api.account.region_by_puuid(
                Continent.EUROPE, account["puuid"]
            )
        except exceptions.DataNotFound as e:
            print(e)  # Output: Data not found (Error Code: 404)
            quit()

        print(f"Region:  {region['region']}")

Custom Exception Handling

Typed exceptions for all HTTP status codes:

from pyke import exceptions

try:
    summoner = await api.summoner.by_puuid(Region.EUW, "NonExistentPuuid")
except exceptions.DataNotFound as e:
    print(f"Not found: {e}")     # Data not found (Error Code: 404)
except exceptions.RateLimitExceeded as e:
    print(f"Rate limited: {e}")  # Rate limit exceeded (Error Code: 429)
except exceptions.InternalServerError as e:
    print(f"Server error: {e}")  # Internal server error (Error Code: 500)

Resources


For any questions or help, please reach out on Discord: .irm

Metadata

Release files for pyke-lol 3.2.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 pyke-lol 3.2.0
File Size Uploaded
pyke_lol-3.2.0.tar.gz 12.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for pyke-lol 3.2.0
File Interpreter ABI Platform
pyke_lol-3.2.0-py3-none-any.whl Python 3 none any Details

Total release size: 40.4 kB

Release files / pyke_lol-3.2.0.tar.gz

Download URL pyke_lol-3.2.0.tar.gz
Size 12.5 kB
Tags Source
SHA-256 checksum
How to use checksums
ad0e4718d95fd53e3ceca1e807f18aa88e811f8dbbaa332ee08ad736965f81a4
BLAKE2b-256 checksum
How to use checksums
0063473d1482d9f3b55c46696591f56886f6b45ed076e284a7c66cecd9c380c4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Mar 3, 2026.

Transparency log

Release files / pyke_lol-3.2.0-py3-none-any.whl

Download URL pyke_lol-3.2.0-py3-none-any.whl
Size 27.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
849d8ec636a74dad3efc0c19a5bc980842e5742870da7f37e8b0cb7e3ba4783f
BLAKE2b-256 checksum
How to use checksums
7461aa2291c0981bb0ae31c20ffcd0310533883a5720397966f39a4b6c0ffa9f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Mar 3, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

3.2.0 This release

2 release files

3.1.1

2 release files

3.0.0

2 release files

2.1.0

2 release files

2.0.0

2 release files

1.4.1

2 release files

1.4.0

2 release files

1.3.1

2 release files

1.3.0

2 release files

1.2.0

2 release files

1.1.0

2 release files

1.0.0

2 release files

0.4.0

2 release files

0.2.0

2 release files

0.1.0

2 release files

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