RiotSkillIssue¶
The production-ready, auto-updating, and fully typed Python wrapper for the Riot Games API.
-
Type-Safe
100% Pydantic models for all requests and responses. No more dictionary guessing.
-
Auto-Updated
Generated daily from the Official OpenAPI Spec. Supports LoL, TFT, LoR, and VALORANT.
-
Resilient by Design
Built-in exponential backoff, automatic
Retry-Afterhandling, and a rich error hierarchy. -
Distributed
Pluggable Redis support for shared rate limiting and caching across multiple processes.
-
Sync & Async
First-class async client and a synchronous
SyncRiotClientfor scripts, notebooks, and CLI tools. -
Secure Auth
RSO OAuth2 with PKCE and CSRF state parameter out of the box.
Quick Installation¶
Quick Example (Async)¶
import asyncio
from riotskillissue import RiotClient, Platform
async def main():
async with RiotClient() as client:
account = await client.account.get_by_riot_id(
region=Platform.AMERICAS,
gameName="Faker",
tagLine="KR1"
)
print(f"Found: {account.gameName}#{account.tagLine}")
print(f"PUUID: {account.puuid}")
if __name__ == "__main__":
asyncio.run(main())
Quick Example (Sync)¶
from riotskillissue import SyncRiotClient, Platform
with SyncRiotClient() as client:
account = client.account.get_by_riot_id(
region=Platform.AMERICAS,
gameName="Faker",
tagLine="KR1"
)
print(f"Found: {account.gameName}#{account.tagLine}")
API Key Setup
Set the RIOT_API_KEY environment variable, or pass it directly to RiotClient(api_key="...").
Get your key at developer.riotgames.com.
What's New in v0.3.0¶
Breaking Changes
- Python 3.10+ is now required (3.8 and 3.9 dropped)
redisandtextualare now optional extras — install withpip install riotskillissue[redis]or[tui]RedisCacheserialization switched from pickle to JSON+base64 — flush your Redis cache after upgrading
py.typed— PEP 561 marker for downstream type-checking support- Context managers —
RsoClientandDataDragonClientnow supportasync with - Safer caching —
RedisCacheno longer usespickle, eliminating code execution risk from tampered entries - Better rate limiting —
MemoryRateLimiterreleases its lock while sleeping, unblocking other keys - More exports —
AbstractRateLimiter,MemoryRateLimiter,gather_limited,DataDragonClient,RsoClient,RsoConfig,TokenResponse
See the full Changelog for details.
Next Steps¶
-
Complete installation and setup guide
-
Redis caching, rate limiting, and advanced options
-
Working code examples for LoL, TFT, and VALORANT
-
Complete endpoint documentation