⛔️ DEPRACATED: aiocodingame module¶
Use the codingame module instead.
Install that module:
pip install codingame[async]
To create an asynchronous client:
1import asyncio
2import codingame
3
4async def main():
5 client = codingame.Client(is_async=True)
6
7 # if you want to log in
8 await client.login("email@example.com", "password")
9
10 # get a codingamer
11 codingamer = await client.get_codingamer("username")
12 print(codingamer.pseudo)
13
14 # get the global leaderboard
15 global_leaderboard = await client.get_global_leaderboard()
16 # print the pseudo of the top codingamer
17 print(global_leaderboard.users[0].pseudo)
18
19asyncio.run(main())