A friendly, fully-typed Python wrapper around the Clash Royale API.
Cooked by Guillaume Coussot 👨🍳
The package is published on PyPI and can be installed by running:
pip install clash-royale-pythonEasily query the Clash Royale API from your Python code. The data returned by the API is mapped to fully-typed Python models:
import clash_royale
client = clash_royale.Client(api_key="your-api-key")
# Get a player by tag
player = client.players.get("#ABC123")
print(player.name)
# Get a clan and its members
clan = client.clans.get("#XYZ789")
for member in client.clans.get_members("#XYZ789"):
print(member.name)
# Search for clans
results = client.clans.search(name="Royal")
for clan in results:
print(clan.name)Ready for more? Check out the full documentation.