Metadata-Version: 2.5
Name: riotskillissue
Version: 1.2.0
Summary: Typed Python client and local MCP server for Riot Games APIs.
Project-URL: Homepage, https://github.com/Demoen/riotskillissue
Project-URL: Repository, https://github.com/Demoen/riotskillissue
Project-URL: Issues, https://github.com/Demoen/riotskillissue/issues
Project-URL: Changelog, https://github.com/Demoen/riotskillissue/blob/main/CHANGELOG.md
Author: Demoen
License-Expression: MIT
License-File: LICENSE
Keywords: api,league-of-legends,lor,mcp,riot,tft,valorant
Classifier: Development Status :: 5 - Production/Stable
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3.14
Classifier: Programming Language :: Python :: 3.15
Classifier: Programming Language :: Python :: 3.16
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Typing :: Typed
Requires-Python: <3.17,>=3.14
Requires-Dist: httpx<1,>=0.27.0
Requires-Dist: pydantic<3,>=2.13.4
Requires-Dist: rich>=13.7.0
Requires-Dist: tenacity>=8.2.0
Requires-Dist: typer>=0.12.0
Provides-Extra: dev
Requires-Dist: hatch>=1.14.0; extra == 'dev'
Requires-Dist: jinja2>=3.1.0; extra == 'dev'
Requires-Dist: mcp[cli]<3,>=2; extra == 'dev'
Requires-Dist: mypy>=1.19.0; extra == 'dev'
Requires-Dist: pytest-asyncio>=1.4.0; extra == 'dev'
Requires-Dist: pytest-cov>=5.0.0; extra == 'dev'
Requires-Dist: pytest>=8.0.0; extra == 'dev'
Requires-Dist: respx>=0.21.0; extra == 'dev'
Requires-Dist: ruff>=0.15.0; extra == 'dev'
Requires-Dist: textual-dev>=1.0.0; extra == 'dev'
Requires-Dist: types-redis; extra == 'dev'
Requires-Dist: types-requests; extra == 'dev'
Provides-Extra: docs
Requires-Dist: zensical<0.1.0,>=0.0.59; extra == 'docs'
Provides-Extra: mcp
Requires-Dist: mcp<3,>=2; extra == 'mcp'
Provides-Extra: redis
Requires-Dist: redis>=5.0.1; extra == 'redis'
Provides-Extra: tui
Requires-Dist: textual>=0.85.0; extra == 'tui'
Description-Content-Type: text/markdown

# RiotSkillIssue

<div align="center">

![riotskillissue](docs/assets/logo.png)

[![PyPI version](https://badge.fury.io/py/riotskillissue.svg?icon=si%3Apython)](https://badge.fury.io/py/riotskillissue)
[![Python Versions](https://img.shields.io/pypi/pyversions/riotskillissue.svg)](https://pypi.org/project/riotskillissue/)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](LICENSE)
[![Tests](https://github.com/Demoen/riotskillissue/actions/workflows/test.yml/badge.svg)](https://github.com/Demoen/riotskillissue/actions/workflows/test.yml)
[![PyPI Downloads](https://static.pepy.tech/personalized-badge/riotskillissue?period=total&units=INTERNATIONAL_SYSTEM&left_color=BLACK&right_color=GREEN&left_text=downloads)](https://pepy.tech/projects/riotskillissue)

**Typed async and sync Riot Games APIs, plus an optional local MCP server.**

[Documentation](https://demoen.github.io/riotskillissue/) · [Migration guide](https://demoen.github.io/riotskillissue/migration/) · [API reference](https://demoen.github.io/riotskillissue/api-reference/)

</div>

## Install

RiotSkillIssue 1.x requires Python `>=3.14,<3.17`. CI tests Python 3.14 and
3.15 on Linux and Windows, and release verification checks both versions.
A separate Python 3.16-dev compatibility probe runs when its dependencies can
be installed; unavailable upstream dependencies are reported without failing
that probe.

```bash
pip install riotskillissue
```

Set `RIOT_API_KEY` or pass a key directly:

```python
import asyncio

from riotskillissue import PlatformRoute, RiotClient


async def main() -> None:
    async with RiotClient(
        api_key="RGAPI-...",
        default_route=PlatformRoute.EUW1,
    ) as riot:
        profile = await riot.lol.player_profile("Player#EUW")
        history = await riot.lol.match_history("Player#EUW", count=5)
        match = await riot.raw.lol.match.get_match(match_id="EUW1_...")
        print(profile, history, match)


asyncio.run(main())
```

The explicit synchronous client provides the same workflows and raw operation
groups:

```python
from riotskillissue import PlatformRoute, SyncRiotClient

with SyncRiotClient(default_route=PlatformRoute.EUW1) as riot:
    print(riot.lol.player_profile("Player#EUW"))
```

## Replay downloads

Open the League Client and sign in, then choose a replay from another player's
recent matches using their full Riot ID:

```bash
riotskillissue-cli replays list --player "GameName#TagLine"
riotskillissue-cli replays download --player "GameName#TagLine"
```

For a direct selection and an explicit destination:

```bash
riotskillissue-cli replays download 1 --player "GameName#TagLine" --output ./replays/my-game.rofl
```

This requires League running on the same Windows or macOS machine, with the
target match accessible on the client's region. No API key or RSO token is
needed. Riot's limit of 10 downloads per hour applies through the client. The
League Client API is not officially supported by Riot and may change between
patches.

The public API workflow remains available by omitting `--player` and setting
`RIOT_RSO_ACCESS_TOKEN`. It returns replays for that token's player. Python
applications can use `LeagueReplayClient` for player lookups or the async/sync
`lol.replays()` and `lol.download_replay()` RSO helpers. See the
[replay guide](https://demoen.github.io/riotskillissue/replays/) for client setup,
RSO authentication, limits, and examples.

## Local MCP server

Install the optional server and run it over stdio:

```bash
pip install "riotskillissue[mcp]"
riotskillissue-mcp
```

The server reads credentials from its environment. API keys and RSO tokens are
never tool arguments. Raw write operations are hidden unless
`RIOT_MCP_ALLOW_WRITES=true`; enabled writes still require human confirmation.

League-aware tools assemble Match V5, timeline, player, ranked, mastery, and
patch-matched Data Dragon evidence for natural-language questions. For example,
`riot_lol_match_context` can resolve a match directly or from a player's recent
history and assess Void Grub captures, trades, and later turret conversion while
clearly separating observed telemetry from causal inference. Patch-banded
fundamentals cover minion-wave gold and XP, sharing, passive income, structures,
objectives, role modifiers, and wave-management opportunity costs.
`riot_lol_item_economy` derives patch-matched raw-stat efficiency from Data
Dragon component prices while leaving passives and unrepresented stats unpriced. See the
[MCP guide](https://demoen.github.io/riotskillissue/mcp/) for tools, production
limits, and data-coverage boundaries.

## Coverage and generation

The generated raw API covers every operation in the bundled community-maintained
OpenAPI feed. That feed is not an official Riot Games specification. One
committed operation registry drives raw dispatch, reference documentation, and
MCP discovery.

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 [LICENSE](LICENSE).
