Skip to main content
https://raw.githubusercontent.com/Ombucha/clashroyale.py/main/banner.png PyPI version PyPI downloads Lines of code Repository size

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

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")

Download files

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

Source Distribution

clashroyale_py-1.0.1.tar.gz (12.8 kB view details)

Uploaded Source

Built Distribution

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

clashroyale_py-1.0.1-py3-none-any.whl (12.9 kB view details)

Uploaded Python 3

File details

Details for the file clashroyale_py-1.0.1.tar.gz.

File metadata

  • Download URL: clashroyale_py-1.0.1.tar.gz
  • Upload date:
  • Size: 12.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.9.23

File hashes

Hashes for clashroyale_py-1.0.1.tar.gz
Algorithm Hash digest
SHA256 5854fbd8590f89c6791756b79311ff0f8fd7f77f2065ac2f379465a9ee4434e1
MD5 17fad1ad8baa81718093793e7ba40dad
BLAKE2b-256 ce1e3480ea81c61487b7b66b9290fda5055175bfbbed5598f1168e0180f75652

See more details on using hashes here.

File details

Details for the file clashroyale_py-1.0.1-py3-none-any.whl.

File metadata

  • Download URL: clashroyale_py-1.0.1-py3-none-any.whl
  • Upload date:
  • Size: 12.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.9.23

File hashes

Hashes for clashroyale_py-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 b87cdeeb80bce840bacbb3e26ca13ff5c064f7ac88970a1fb88ae34d753a34e4
MD5 af26b2d57d5d891eb889515f47e82434
BLAKE2b-256 6003b70cb44ee671d7949776baaed5dfcd48d71234386519f5e3cf79581afb4b

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

1.0.1 This release

2 files

1.0.0

2 files

Supported by

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