pyke
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.3.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| pyke_lol-3.3.0.tar.gz | 20.7 kB | With provenance | Details for pyke_lol-3.3.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| pyke_lol-3.3.0-py3-none-any.whl | Python 3 | none | any | Details for pyke_lol-3.3.0-py3-none-any.whl |
Total release size: 49.1 kB
Release files / pyke_lol-3.3.0.tar.gz
| Download URL | pyke_lol-3.3.0.tar.gz |
|---|---|
| Size | 20.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
63018101f3e9aeb49edac36efe8d7fbc85a41cbc6b020ec6607c24f74dbd6792
|
|
BLAKE2b-256 checksum How to use checksums |
f8cf16d60eaa5a3a63032571321844973b84036b05d51279e4b6e29cdb802154
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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 Nov 21, 2026.
Transparency logRelease files / pyke_lol-3.3.0-py3-none-any.whl
| Download URL | pyke_lol-3.3.0-py3-none-any.whl |
|---|---|
| Size | 28.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
2f212ab779c52013cea737758a1e0f5ef2b07161d0f7b21e0a1a16aca8b4f1d4
|
|
BLAKE2b-256 checksum How to use checksums |
0671e225b543eca0191b21bd06cee0aeb91bbbb6d1d0b68a845446072613ed04
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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 Nov 21, 2026.
Transparency logSecurity for pyke-lol 3.3.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.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for pyke_lol-3.3.0.tar.gz
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 Nov 21, 2026.
Transparency logA 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.