riotskillissue 0.1.2__py3-none-any.whl → 0.1.3__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,150 @@
1
+ Metadata-Version: 2.4
2
+ Name: riotskillissue
3
+ Version: 0.1.3
4
+ Summary: Production-ready, auto-updating Riot API wrapper.
5
+ Author: Demoen
6
+ License-File: LICENSE
7
+ Classifier: Development Status :: 4 - Beta
8
+ Classifier: Intended Audience :: Developers
9
+ Classifier: License :: OSI Approved :: GNU General Public License v3 (GPLv3)
10
+ Classifier: Programming Language :: Python :: 3.8
11
+ Classifier: Programming Language :: Python :: 3.9
12
+ Classifier: Programming Language :: Python :: 3.10
13
+ Classifier: Programming Language :: Python :: 3.11
14
+ Classifier: Programming Language :: Python :: 3.12
15
+ Classifier: Programming Language :: Python :: 3.13
16
+ Requires-Python: >=3.8
17
+ Requires-Dist: frozendict>=2.4.0
18
+ Requires-Dist: httpx>=0.27.0
19
+ Requires-Dist: jinja2>=3.1.0
20
+ Requires-Dist: msgspec>=0.18.0
21
+ Requires-Dist: pydantic>=2.7.0
22
+ Requires-Dist: redis>=5.0.0
23
+ Requires-Dist: tenacity>=8.2.0
24
+ Provides-Extra: dev
25
+ Requires-Dist: deepdiff>=6.0.0; extra == 'dev'
26
+ Requires-Dist: mypy>=1.10.0; extra == 'dev'
27
+ Requires-Dist: pytest-asyncio>=0.23.0; extra == 'dev'
28
+ Requires-Dist: pytest-cov>=5.0.0; extra == 'dev'
29
+ Requires-Dist: pytest>=8.0.0; extra == 'dev'
30
+ Requires-Dist: respx>=0.21.0; extra == 'dev'
31
+ Requires-Dist: rich>=13.7.0; extra == 'dev'
32
+ Requires-Dist: ruff>=0.4.0; extra == 'dev'
33
+ Requires-Dist: typer>=0.12.0; extra == 'dev'
34
+ Requires-Dist: types-redis; extra == 'dev'
35
+ Requires-Dist: types-requests; extra == 'dev'
36
+ Provides-Extra: docs
37
+ Requires-Dist: mkdocs-material>=9.5.0; extra == 'docs'
38
+ Requires-Dist: mkdocs>=1.5.0; extra == 'docs'
39
+ Description-Content-Type: text/markdown
40
+
41
+ # RiotSkillIssue
42
+
43
+ <div align="center">
44
+
45
+ [![PyPI version](https://badge.fury.io/py/riotskillissue.svg)](https://badge.fury.io/py/riotskillissue)
46
+ [![Python Versions](https://img.shields.io/pypi/pyversions/riotskillissue.svg)](https://pypi.org/project/riotskillissue/)
47
+ [![License: GPL v3](https://img.shields.io/badge/License-GPLv3-blue.svg)](LICENSE)
48
+ [![Tests](https://github.com/Demoen/riotskillissue/actions/workflows/test.yml/badge.svg)](https://github.com/Demoen/riotskillissue/actions/workflows/test.yml)
49
+
50
+ **Production-ready, auto-updating, and fully typed Python wrapper for the Riot Games API.**
51
+
52
+ [Documentation](https://demoen.github.io/riotskillissue/) · [Examples](https://demoen.github.io/riotskillissue/examples/) · [API Reference](https://demoen.github.io/riotskillissue/api-reference/)
53
+
54
+ </div>
55
+
56
+ ---
57
+
58
+ ## Features
59
+
60
+ | Feature | Description |
61
+ |---------|-------------|
62
+ | **Type-Safe** | 100% Pydantic models for all requests and responses |
63
+ | **Auto-Updated** | Generated daily from the Official OpenAPI Spec |
64
+ | **Resilient** | Built-in exponential backoff, circuit breakers, and `Retry-After` handling |
65
+ | **Distributed** | Pluggable Redis support for shared rate limiting and caching |
66
+ | **Multi-Game** | Full support for LoL, TFT, LoR, and VALORANT APIs |
67
+
68
+ ## Installation
69
+
70
+ Requires Python 3.8+.
71
+
72
+ ```bash
73
+ pip install riotskillissue
74
+ ```
75
+
76
+ ## Quick Start
77
+
78
+ ```python
79
+ import asyncio
80
+ from riotskillissue import RiotClient, Platform, Region
81
+
82
+ async def main():
83
+ async with RiotClient() as client:
84
+ # Look up account by Riot ID
85
+ account = await client.account.get_by_riot_id(
86
+ region=Platform.EUROPE,
87
+ gameName="Agurin",
88
+ tagLine="EUW"
89
+ )
90
+ print(f"Found: {account.gameName}#{account.tagLine}")
91
+
92
+ # Get summoner data
93
+ summoner = await client.summoner.get_by_puuid(
94
+ region=Region.EUW1,
95
+ encryptedPUUID=account.puuid
96
+ )
97
+ print(f"Level: {summoner.summonerLevel}")
98
+
99
+ if __name__ == "__main__":
100
+ asyncio.run(main())
101
+ ```
102
+
103
+ Set your API key via environment variable:
104
+
105
+ ```bash
106
+ export RIOT_API_KEY="RGAPI-your-key-here"
107
+ ```
108
+
109
+ Or pass it directly:
110
+
111
+ ```python
112
+ async with RiotClient(api_key="RGAPI-...") as client:
113
+ ...
114
+ ```
115
+
116
+ ## Configuration
117
+
118
+ ```python
119
+ from riotskillissue import RiotClient, RiotClientConfig
120
+ from riotskillissue.core.cache import RedisCache
121
+
122
+ config = RiotClientConfig(
123
+ api_key="RGAPI-...",
124
+ max_retries=5,
125
+ redis_url="redis://localhost:6379/0" # Distributed rate limiting
126
+ )
127
+
128
+ cache = RedisCache("redis://localhost:6379/1")
129
+
130
+ async with RiotClient(config=config, cache=cache) as client:
131
+ ...
132
+ ```
133
+
134
+ ## Documentation
135
+
136
+ Full documentation is available at [demoen.github.io/riotskillissue](https://demoen.github.io/riotskillissue/).
137
+
138
+ - [Getting Started](https://demoen.github.io/riotskillissue/getting-started/)
139
+ - [Configuration](https://demoen.github.io/riotskillissue/configuration/)
140
+ - [Examples](https://demoen.github.io/riotskillissue/examples/)
141
+ - [API Reference](https://demoen.github.io/riotskillissue/api-reference/)
142
+ - [CLI](https://demoen.github.io/riotskillissue/cli/)
143
+
144
+ ## Legal
145
+
146
+ 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.
147
+
148
+ ## License
149
+
150
+ This project is licensed under the GNU General Public License v3.0. See the [LICENSE](LICENSE) file for details.
@@ -68,8 +68,8 @@ riotskillissue/core/pagination.py,sha256=OEiKwBCUt3YhmEQVNujze7k7E9D2cH582NUfOko
68
68
  riotskillissue/core/ratelimit.py,sha256=moCm8ztJWt0tLF6gyJraC68cM8g-Y8KGWvOeEAopkqg,7510
69
69
  riotskillissue/core/types.py,sha256=PUdqAcvraAGQNJHG2jyy0txHM-2_QHXc1Hbp0IMTWc8,1254
70
70
  riotskillissue/core/utils.py,sha256=THNMRbHegLDtHJd0QJ9n4c9T8Jm2l0cQBf0uRAjiC7k,742
71
- riotskillissue-0.1.2.dist-info/METADATA,sha256=Q53Feb7r-HKkFtbWRII8KMXsZePZ-ye8O8YE3oHhOOc,5755
72
- riotskillissue-0.1.2.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
73
- riotskillissue-0.1.2.dist-info/entry_points.txt,sha256=UGwPyhTjcdeyXCvSOAXUzCCRGT2QFV0tbIdjjoFY5rw,63
74
- riotskillissue-0.1.2.dist-info/licenses/LICENSE,sha256=iIq3-s_OspO8VZs4HPK_DS_aPU-kJ0vwYAtQau5nLYY,35175
75
- riotskillissue-0.1.2.dist-info/RECORD,,
71
+ riotskillissue-0.1.3.dist-info/METADATA,sha256=5vgIEUty6lrPPIPESDNlWRY9ijYcrJzZxfUK2Jqa0-Y,5081
72
+ riotskillissue-0.1.3.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
73
+ riotskillissue-0.1.3.dist-info/entry_points.txt,sha256=UGwPyhTjcdeyXCvSOAXUzCCRGT2QFV0tbIdjjoFY5rw,63
74
+ riotskillissue-0.1.3.dist-info/licenses/LICENSE,sha256=iIq3-s_OspO8VZs4HPK_DS_aPU-kJ0vwYAtQau5nLYY,35175
75
+ riotskillissue-0.1.3.dist-info/RECORD,,
@@ -1,168 +0,0 @@
1
- Metadata-Version: 2.4
2
- Name: riotskillissue
3
- Version: 0.1.2
4
- Summary: Production-ready, auto-updating Riot API wrapper.
5
- Author: Demoen
6
- License-File: LICENSE
7
- Classifier: Development Status :: 4 - Beta
8
- Classifier: Intended Audience :: Developers
9
- Classifier: License :: OSI Approved :: GNU General Public License v3 (GPLv3)
10
- Classifier: Programming Language :: Python :: 3.8
11
- Classifier: Programming Language :: Python :: 3.9
12
- Classifier: Programming Language :: Python :: 3.10
13
- Classifier: Programming Language :: Python :: 3.11
14
- Classifier: Programming Language :: Python :: 3.12
15
- Classifier: Programming Language :: Python :: 3.13
16
- Requires-Python: >=3.8
17
- Requires-Dist: frozendict>=2.4.0
18
- Requires-Dist: httpx>=0.27.0
19
- Requires-Dist: jinja2>=3.1.0
20
- Requires-Dist: msgspec>=0.18.0
21
- Requires-Dist: pydantic>=2.7.0
22
- Requires-Dist: redis>=5.0.0
23
- Requires-Dist: tenacity>=8.2.0
24
- Provides-Extra: dev
25
- Requires-Dist: deepdiff>=6.0.0; extra == 'dev'
26
- Requires-Dist: mypy>=1.10.0; extra == 'dev'
27
- Requires-Dist: pytest-asyncio>=0.23.0; extra == 'dev'
28
- Requires-Dist: pytest-cov>=5.0.0; extra == 'dev'
29
- Requires-Dist: pytest>=8.0.0; extra == 'dev'
30
- Requires-Dist: respx>=0.21.0; extra == 'dev'
31
- Requires-Dist: rich>=13.7.0; extra == 'dev'
32
- Requires-Dist: ruff>=0.4.0; extra == 'dev'
33
- Requires-Dist: typer>=0.12.0; extra == 'dev'
34
- Requires-Dist: types-redis; extra == 'dev'
35
- Requires-Dist: types-requests; extra == 'dev'
36
- Description-Content-Type: text/markdown
37
-
38
- # RiotSkillIssue
39
-
40
- <div align="center">
41
-
42
- [![PyPI version](https://badge.fury.io/py/riotskillissue.svg)](https://badge.fury.io/py/riotskillissue)
43
- [![Python Versions](https://img.shields.io/pypi/pyversions/riotskillissue.svg)](https://pypi.org/project/riotskillissue/)
44
- [![License: GPL v3](https://img.shields.io/badge/License-GPLv3-blue.svg)](LICENSE)
45
- [![Tests](https://github.com/Demoen/riotskillissue/actions/workflows/test.yml/badge.svg)](https://github.com/Demoen/riotskillissue/actions/workflows/test.yml)
46
-
47
- **The production-ready, auto-updating, and fully typed Python wrapper for the Riot Games API.**
48
-
49
- [Features](#-features) • [Installation](#-installation) • [Quickstart](#-quickstart) • [Documentation](#-documentation) • [Contributing](docs/CONTRIBUTING.md) • [Changelog](CHANGELOG.md)
50
-
51
- </div>
52
-
53
- ---
54
-
55
- ## 🚀 Features
56
-
57
- - **🛡️ Type-Safe**: 100% Pydantic models for all requests and responses. No more dictionary guessing.
58
- - **🔄 Auto-Updated**: Generated daily from the [Official OpenAPI Spec](https://github.com/MingweiSamuel/riotapi-schema) with other fallbacks. Supports LoL, TFT, LoR, and VALORANT.
59
- - **⚡ Resilient by Design**: Built-in exponential backoff, circuit breakers, and correct `Retry-After` handling.
60
- - **🌍 Distributed**: Pluggable **Redis** support for shared Rate Limiting and Caching across multiple processes.
61
- - **🛠️ Developer Friendly**: Includes a powerful CLI, smart pagination helpers, and RSO (OAuth2) support.
62
-
63
- ## 📦 Installation
64
-
65
- Requires **Python 3.8+**.
66
-
67
- ```bash
68
- pip install riotskillissue
69
- ```
70
-
71
- *Or install with extra dev dependencies:*
72
- ```bash
73
- pip install "riotskillissue[dev]"
74
- ```
75
-
76
- ## ⚡ Quickstart
77
-
78
- ```python
79
- import asyncio
80
- from riotskillissue import RiotClient, Region
81
-
82
- async def main():
83
- # 1. Initialize Client (Auto-loads RIOT_API_KEY from env)
84
- async with RiotClient() as client:
85
-
86
- # 2. Type-Safe API Calls
87
- summoner = await client.summoner.get_by_puuid(
88
- region=Region.NA1,
89
- encryptedPUUID="<YOUR_PUUID>"
90
- )
91
- print(f"Summoner Level: {summoner.summonerLevel}")
92
-
93
- # 3. Smart Pagination (Async Iterator)
94
- from riotskillissue import paginate
95
- async for match_id in paginate(client.match.get_ids_by_puuid, puuid=summoner.puuid, count=20):
96
- print(f"Match: {match_id}")
97
-
98
- if __name__ == "__main__":
99
- asyncio.run(main())
100
- ```
101
-
102
- ## 🛠 Configuration
103
-
104
- Define your configuration using `RiotClientConfig` or environment variables.
105
-
106
- | Parameter | Environment Variable | Default | Description |
107
- | :--- | :--- | :--- | :--- |
108
- | **API Key** | `RIOT_API_KEY` | `None` | Your Riot Games API Key. |
109
- | **Redis URL** | - | `None` | `redis://host:port` for distributed limits. |
110
- | **Max Retries** | - | `3` | Retries for 5xx/Network errors. |
111
- | **Timeout** | - | `5s`/`10s` | Connect/Read timeouts. |
112
-
113
- ```python
114
- config = RiotClientConfig(
115
- api_key="RGAPI-...",
116
- redis_url="redis://localhost:6379/0", # Enables distributed rate limiting
117
- max_retries=5
118
- )
119
- async with RiotClient(config=config) as client:
120
- ...
121
- ```
122
-
123
- ## 🧠 Advanced Usage
124
-
125
- ### Caching
126
- Reduce your API calls with built-in caching.
127
-
128
- ```python
129
- from riotskillissue.core.cache import RedisCache
130
-
131
- cache = RedisCache("redis://localhost:6379/1")
132
- async with RiotClient(cache=cache) as client:
133
- # Requests are now cached!
134
- ...
135
- ```
136
-
137
- ### Data Dragon (Static Data)
138
- Fetch champions, items, and versions without hassle.
139
-
140
- ```python
141
- # Automatically picks the latest version and caches the result
142
- annie = await client.static.get_champion(1)
143
- print(annie["name"]) # "Annie"
144
- ```
145
-
146
- ### CLI Tool
147
- Debug your API keys or look up players instantly from the terminal.
148
-
149
- ```bash
150
- $ riotskillissue-cli summoner "Faker#SKT" --region kr
151
- {
152
- "id": "...",
153
- "accountId": "...",
154
- "puuid": "...",
155
- "name": "Faker",
156
- "profileIconId": 6,
157
- "revisionDate": 1703894832000,
158
- "summonerLevel": 678
159
- }
160
- ```
161
-
162
- ## ⚖️ Legal
163
-
164
- `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.
165
-
166
- ## 📝 License
167
-
168
- This project is licensed under the **GNU General Public License v3.0**. See the [LICENSE](LICENSE) file for details.