Results 1 to 1 of 1

Thread: A Python API Wrapper for the Clash of Clans API

  1. #1 A Python API Wrapper for the Clash of Clans API is an easy to use, asynchronous API wrapper for the Clash of Clans API written in python.

    Key Features:

    • Asynchronous code
    • Entire coverage of the official Clash of Clans API
    • Email/password login removes the stress of managing tokens with a dynamic IP
    • Optimised for speed and performance
    • Open source project
    • Detailed documentation and changelogs


    Installing is easy:

    • Windows: py -3 -m pip install -U
    • Linux/OS X: python3 -m pip install -U

    Quick Example:

    import coc
    import asyncio
    client = coc.Client('email', 'password')
    async def get_some_player(tag):
        player = await client.get_player(tag)
        # alternatively,
    async def get_five_clans(name):
        players = await client.search_clans(name=name, limit=5)
        for n in players:
            print(n, n.tag)
    async def main():
        await get_some_player('tag')
        await get_five_clans('name')
        await client.close()
    if __name__ == '__main__':
        loop = asyncio.get_event_loop()
    It's as simple as that! Furthermore, this library is new and will be regularly receiving updates, as the API (hopefully) grows with the game. Feel free to open an issue on GitHub if you encounter a problem, or a pull request if you have an idea that could be implemented!

    Helpful links:

    Last edited by mathsman5132; May 1st, 2019 at 09:04 AM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts