Skip to main content

Production-ready, auto-updating Riot API wrapper.

Project description

RiotSkillIssue

PyPI version Python Versions License: GPL v3 Tests

The production-ready, auto-updating, and fully typed Python wrapper for the Riot Games API.

FeaturesInstallationQuickstartDocumentationContributing


🚀 Features

  • 🛡️ Type-Safe: 100% Pydantic models for all requests and responses. No more dictionary guessing.
  • 🔄 Auto-Updated: Generated weekly from the Official OpenAPI Spec. Supports LoL, TFT, LoR, and VALORANT.
  • ⚡ Resilient by Design: Built-in exponential backoff, circuit breakers, and correct Retry-After handling.
  • 🌍 Distributed: Pluggable Redis support for shared Rate Limiting and Caching across multiple processes.
  • 🛠️ Developer Friendly: Includes a powerful CLI, smart pagination helpers, and RSO (OAuth2) support.

📦 Installation

Requires Python 3.8+.

pip install riotskillissue

Or install with extra dev dependencies:

pip install "riotskillissue[dev]"

⚡ Quickstart

import asyncio
from riotskillissue import RiotClient, Region

async def main():
    # 1. Initialize Client (Auto-loads RIOT_API_KEY from env)
    async with RiotClient() as client:
    
        # 2. Type-Safe API Calls
        summoner = await client.summoner.get_by_puuid(
             region=Region.NA1,
             encryptedPUUID="<YOUR_PUUID>"
        )
        print(f"Summoner Level: {summoner.summonerLevel}")
        
        # 3. Smart Pagination (Async Iterator)
        from riotskillissue import paginate
        async for match_id in paginate(client.match.get_ids_by_puuid, puuid=summoner.puuid, count=20):
             print(f"Match: {match_id}")

if __name__ == "__main__":
    asyncio.run(main())

🛠 Configuration

Define your configuration using RiotClientConfig or environment variables.

Parameter Environment Variable Default Description
API Key RIOT_API_KEY None Your Riot Games API Key.
Redis URL - None redis://host:port for distributed limits.
Max Retries - 3 Retries for 5xx/Network errors.
Timeout - 5s/10s Connect/Read timeouts.
config = RiotClientConfig(
    api_key="RGAPI-...",
    redis_url="redis://localhost:6379/0", # Enables distributed rate limiting
    max_retries=5
)
async with RiotClient(config=config) as client:
    ...

🧠 Advanced Usage

Caching

Reduce your API calls with built-in caching.

from riotskillissue.core.cache import RedisCache

cache = RedisCache("redis://localhost:6379/1")
async with RiotClient(cache=cache) as client:
    # Requests are now cached!
    ...

Data Dragon (Static Data)

Fetch champions, items, and versions without hassle.

# Automatically picks the latest version and caches the result
annie = await client.static.get_champion(1)
print(annie["name"])  # "Annie"

CLI Tool

Debug your API keys or look up players instantly from the terminal.

$ riotskillissue-cli summoner "Faker#SKT" --region kr
{
  "id": "...",
  "accountId": "...",
  "puuid": "...",
  "name": "Faker",
  "profileIconId": 6,
  "revisionDate": 1703894832000,
  "summonerLevel": 678
}

⚖️ Legal

riotskillissue isn't endorsed by Riot Games and doesn't 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

This project is licensed under the GNU General Public License v3.0. See the LICENSE file for details.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

riotskillissue-0.1.1.tar.gz (46.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

riotskillissue-0.1.1-py3-none-any.whl (74.9 kB view details)

Uploaded Python 3

File details

Details for the file riotskillissue-0.1.1.tar.gz.

File metadata

  • Download URL: riotskillissue-0.1.1.tar.gz
  • Upload date:
  • Size: 46.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for riotskillissue-0.1.1.tar.gz
Algorithm Hash digest
SHA256 efc8d992f108cb07564eeff3bfd3cd2810523899a8ba5dfdd4da806ada923dcd
MD5 ed718d7a4f48b038b7ebca2898340dc2
BLAKE2b-256 4936d61510fe1d4d305b1bb47b2b009d272f4ffc44b5f47dbf102cc56d30521b

See more details on using hashes here.

Provenance

The following attestation bundles were made for riotskillissue-0.1.1.tar.gz:

Publisher: publish.yml on Demoen/riotskillissue

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file riotskillissue-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: riotskillissue-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 74.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for riotskillissue-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 5ee2d56314ce7b7a92f57cceb8dc5e056d91233166699e648aae9b3560e96bdc
MD5 836edf503de92be9c753786476826ccb
BLAKE2b-256 cec68eb11d5bd0468c3123fa31e81e6fdfd6224763e8e44059b42c8bcfab1258

See more details on using hashes here.

Provenance

The following attestation bundles were made for riotskillissue-0.1.1-py3-none-any.whl:

Publisher: publish.yml on Demoen/riotskillissue

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page