A modern, easy-to-use, and feature-rich Python wrapper for the Clash Royale API.
Features
Full support for all Clash Royale API endpoints
Event-driven architecture (with decorators)
Pythonic models for all objects (players, clans, tournaments, etc.)
Built-in error handling and rate limit management
Type hints for all public interfaces
Actively maintained and open source
Requirements
Python 3.8 or higher
Installation
Stable version:
# Unix / macOS
python3 -m pip install "clashroyale.py"
# Windows
py -m pip install "clashroyale.py"
Development version:
git clone https://github.com/Ombucha/clashroyale.py
Getting Started
import clashroyale as cr
client = cr.Client("token")
# Fetch a player by tag
player = client.get_player("#URUGP8G0")
print(f"{player.name}: {player.trophies} trophies")
# Fetch a clan and its members
clan = client.get_clan("#Q9LYC0YL")
print(f"Clan: {clan.name} ({clan.tag})")
for member in clan.member_list:
print(f"{member.name} - {member.trophies} trophies")
# Get top 5 global players
top_players = client.get_player_rankings("global", limit=5)
for player in top_players:
print(f"{player.rank}. {player.name} - {player.trophies} trophies")
Links
Note: If you encounter issues, please search for duplicates and then create a new issue on GitHub with as much detail as possible (including terminal output, OS details, and Python version).
Metadata
Release files for clashroyale.py 1.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| clashroyale_py-1.0.1.tar.gz | 12.8 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| clashroyale_py-1.0.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 25.7 kB
Release files / clashroyale_py-1.0.1.tar.gz
| Download URL | clashroyale_py-1.0.1.tar.gz |
|---|---|
| Size | 12.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
5854fbd8590f89c6791756b79311ff0f8fd7f77f2065ac2f379465a9ee4434e1
|
|
BLAKE2b-256 checksum How to use checksums |
ce1e3480ea81c61487b7b66b9290fda5055175bfbbed5598f1168e0180f75652
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.9.23
|
Release files / clashroyale_py-1.0.1-py3-none-any.whl
| Download URL | clashroyale_py-1.0.1-py3-none-any.whl |
|---|---|
| Size | 12.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
b87cdeeb80bce840bacbb3e26ca13ff5c064f7ac88970a1fb88ae34d753a34e4
|
|
BLAKE2b-256 checksum How to use checksums |
6003b70cb44ee671d7949776baaed5dfcd48d71234386519f5e3cf79581afb4b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.9.23
|