Production-ready, auto-updating Riot API wrapper.
Project description
RiotSkillIssue
Production-ready, auto-updating, and fully typed Python wrapper for the Riot Games API.
Features
| Feature | Description |
|---|---|
| Type-Safe | 100% Pydantic models for all requests and responses |
| Auto-Updated | Generated daily from the Official OpenAPI Spec |
| Sync & Async | First-class async client and a synchronous SyncRiotClient for scripts & notebooks |
| Resilient | Automatic Retry-After handling, exponential backoff, and a rich error hierarchy |
| Distributed | Pluggable Redis support for shared rate limiting and caching |
| Multi-Game | Full support for LoL, TFT, LoR, and VALORANT APIs |
Installation
Requires Python 3.8+.
pip install riotskillissue
Quick Start (Async)
import asyncio
from riotskillissue import RiotClient, Platform, Region
async def main():
async with RiotClient() as client:
account = await client.account.get_by_riot_id(
region=Platform.EUROPE,
gameName="Agurin",
tagLine="EUW"
)
print(f"Found: {account.gameName}#{account.tagLine}")
summoner = await client.summoner.get_by_puuid(
region=Region.EUW1,
encryptedPUUID=account.puuid
)
print(f"Level: {summoner.summonerLevel}")
if __name__ == "__main__":
asyncio.run(main())
Quick Start (Sync)
from riotskillissue import SyncRiotClient, Platform
with SyncRiotClient() as client:
account = client.account.get_by_riot_id(
region=Platform.EUROPE,
gameName="Agurin",
tagLine="EUW"
)
print(f"Found: {account.gameName}#{account.tagLine}")
Set your API key via environment variable:
export RIOT_API_KEY="RGAPI-your-key-here"
Or pass it directly:
async with RiotClient(api_key="RGAPI-...") as client:
...
Configuration
from riotskillissue import RiotClient, RiotClientConfig
from riotskillissue.core.cache import RedisCache, MemoryCache
config = RiotClientConfig(
api_key="RGAPI-...",
max_retries=5,
cache_ttl=120,
redis_url="redis://localhost:6379/0", # Distributed rate limiting
proxy="http://127.0.0.1:8080", # Optional HTTP proxy
log_level="DEBUG", # DEBUG, INFO, WARNING
)
cache = MemoryCache(max_size=2048) # LRU in-memory cache
# or: cache = RedisCache("redis://localhost:6379/1")
async with RiotClient(config=config, cache=cache) as client:
...
Error Handling
from riotskillissue import NotFoundError, RateLimitError, RiotAPIError
try:
account = await client.account.get_by_riot_id(...)
except NotFoundError:
print("Player not found")
except RiotAPIError as e:
print(f"[{e.status}] {e.message}")
Documentation
Full documentation is available at demoen.github.io/riotskillissue.
Legal
RiotSkillIssue is not endorsed by Riot Games and does not reflect the views or opinions of Riot Games or anyone officially involved in producing or managing Riot Games properties. Riot Games and all associated properties are trademarks or registered trademarks of Riot Games, Inc.
License
MIT. See the LICENSE file for details.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file riotskillissue-0.2.2.tar.gz.
File metadata
- Download URL: riotskillissue-0.2.2.tar.gz
- Upload date:
- Size: 1.5 MB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
86c565c02b6255996e51fa85d73a5759983524608b8a63e3a603655d27bdb18d
|
|
| MD5 |
431b7030f88ea1150313f30458c7035e
|
|
| BLAKE2b-256 |
8e22246e0fb4cf9d310dd74a944a878135353f83735e4453be5f520fe2bf4935
|
Provenance
The following attestation bundles were made for riotskillissue-0.2.2.tar.gz:
Publisher:
publish.yml on Demoen/riotskillissue
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
riotskillissue-0.2.2.tar.gz -
Subject digest:
86c565c02b6255996e51fa85d73a5759983524608b8a63e3a603655d27bdb18d - Sigstore transparency entry: 984888929
- Sigstore integration time:
-
Permalink:
Demoen/riotskillissue@02f0a9e3069c5ba00241758dd9376cbdb26d56be -
Branch / Tag:
refs/tags/v0.2.2 - Owner: https://github.com/Demoen
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@02f0a9e3069c5ba00241758dd9376cbdb26d56be -
Trigger Event:
release
-
Statement type:
File details
Details for the file riotskillissue-0.2.2-py3-none-any.whl.
File metadata
- Download URL: riotskillissue-0.2.2-py3-none-any.whl
- Upload date:
- Size: 72.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1b3446f6db6228d65e6e7f870b7a9aac994adbbc37466ef9725ab61bfcd19477
|
|
| MD5 |
b6a720518b6bc645104990e671f92fbf
|
|
| BLAKE2b-256 |
c26128f72f6cd401078c1500458ca29edeff0b0dee21b2daad00b8e86db2e82a
|
Provenance
The following attestation bundles were made for riotskillissue-0.2.2-py3-none-any.whl:
Publisher:
publish.yml on Demoen/riotskillissue
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
riotskillissue-0.2.2-py3-none-any.whl -
Subject digest:
1b3446f6db6228d65e6e7f870b7a9aac994adbbc37466ef9725ab61bfcd19477 - Sigstore transparency entry: 984888937
- Sigstore integration time:
-
Permalink:
Demoen/riotskillissue@02f0a9e3069c5ba00241758dd9376cbdb26d56be -
Branch / Tag:
refs/tags/v0.2.2 - Owner: https://github.com/Demoen
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@02f0a9e3069c5ba00241758dd9376cbdb26d56be -
Trigger Event:
release
-
Statement type: