Skip to main content

A Clash of Clans API

Project description

PyPi Supported Versions MIT License

ClashofClans-API is an easy to use API for the mobile game ClashofClans

Installing

Install and update using pip:

$ pip install clashofclans-api

Create an API token

An API token is required to execute the script. You can create one here.

A Simple Example

from ClashofClans import ClashofClans

coc = ClashofClans("your API token")

response = coc.players.get_player_info("e.g. #9Q8QYQ20Q or 9Q8QYQ20Q")

print(response)
$ python3 file.py
    (200, <Response [200]>, {'tag': '#9Q8QYQ20Q', 'name': 'Orange', 'townHallLevel': 15, 'townHallWeaponLevel': 4, 'expLevel': 244, ...

Disclaimer

This content is not affiliated with, endorsed, sponsored, or specifically approved by Supercell and Supercell is not responsible for it. For more information see Supercell’s Fan Content Policy.

Project details


Download files

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

Source Distribution

clashofclans-api-1.0.1.tar.gz (5.3 kB view hashes)

Uploaded Source

Built Distribution

clashofclans_api-1.0.1-py3-none-any.whl (5.7 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page