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.

FeaturesInstallationQuickstartDocumentationContributingChangelog


🚀 Features

  • 🛡️ Type-Safe: 100% Pydantic models for all requests and responses. No more dictionary guessing.
  • 🔄 Auto-Updated: Generated daily from the Official OpenAPI Spec with other fallbacks. 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.2.tar.gz (58.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.2-py3-none-any.whl (86.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: riotskillissue-0.1.2.tar.gz
  • Upload date:
  • Size: 58.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.2.tar.gz
Algorithm Hash digest
SHA256 dba97e428d681b4c6f43cc1cb9331d963ce2ac03b62e7e8b409113dc7a312c9a
MD5 c2f7b36cf7214d1ffc15936cacc00d5d
BLAKE2b-256 fa6476c827557d157ba45bd73788fc41787c378105d45d820e02a52564191bf4

See more details on using hashes here.

Provenance

The following attestation bundles were made for riotskillissue-0.1.2.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.2-py3-none-any.whl.

File metadata

  • Download URL: riotskillissue-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 86.4 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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 6189235a243d30a4b71633883f3af5bcfbf1966d1fc593660e5d6d55422e72d9
MD5 33de60edf2f145d440f3d1970f99e194
BLAKE2b-256 84b2a9c0562754b693beba4fbb27eebbba99239f027ca01de3b48768c3fa03db

See more details on using hashes here.

Provenance

The following attestation bundles were made for riotskillissue-0.1.2-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