Codingame

Latest version: v1.4.3

Safety actively analyzes 681866 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 3 of 4

1.0

Changelog

- Add support for asynchronous client with `Client(is_async=True)`, see [the docs](https://codingame.readthedocs.io/en/latest/user_guide/async.html).

- Add support for context managers:
py
synchronous
with Client() as client:
client.get_global_leaderboard()

asynchronous
async with Client(is_async=True) as client:
await client.get_global_leaderboard()


- Remove properties like ``CodinGamer.followers`` in favor of methods like `CodinGamer.get_followers` to better differentiate API calls and to make it compatible with async API calls. Here's a list of all of the changed ones:
- `Client.language_ids` -> `Client.get_language_ids`
- `Client.unseen_notifications` -> `Client.get_unseen_notifications`
- `CodinGamer.followers` -> `CodinGamer.get_followers`
- `CodinGamer.followers_ids` -> `CodinGamer.get_followers_ids`
- `CodinGamer.following` -> `CodinGamer.get_followed`
- `CodinGamer.following_ids` -> `CodinGamer.get_followed_ids`
- `CodinGamer.clash_of_code_rank` ->
`CodinGamer.get_clash_of_code_rank`

- Add more exceptions: `LoginError` regroups all the exceptions related to login: `LoginRequired`, `EmailRequired`, `MalformedEmail`, `PasswordRequired`, `EmailNotLinked` and `IncorrectPassword`. And `NotFound` regroups `CodinGamerNotFound`, `ClashOfCodeNotFound`, `ChallengeNotFound` and `PuzzleNotFound`.

- Make all attributes of CodinGame models read-only.

- Add `ChallengeLeaderboard.has_leagues` and `PuzzleLeaderboard.has_leagues`.

- Add `Notification._raw`.

- Change `ClashOfCode.time_before_start` and `ClashOfCode.time_before_end` from `float` to `datetime.timedelta`.

- Remove argument type validation, not my fault if you can't read the docs.

- Rewrite the way the client works to implement a class to manage the connection state and separate the `Client` that the user uses from the HTTP client that interacts with the API.

Update

Update the module by doing `pip install codingame --upgrade`

Links

PyPi: https://pypi.org/project/codingame
Docs: https://codingame.readthedocs.io

1.0.0

0.4

Changelog

- Add support for leaderboards in `Client.get_global_leaderboard`, `Client.get_challenge_leaderboard` and `Client.get_puzzle_leaderboard`. See [docs](https://codingame.readthedocs.io/en/v0.4.0/api.html#leaderboards).
- Bug fixes

Update
Update the module by doing `pip install codingame --upgrade`
Links
PyPi: https://pypi.org/project/codingame
Docs: https://codingame.readthedocs.io/en/latest/index.html

0.4.0

0.3.5

Changelog
- Add support for ids in `Client.get_codingamer`.
py
import codingame
client = codingame.Client()
codingamer = client.get_codingamer(3877165)
print(codingamer.pseudo)


- Add `CodinGamer.followers_ids` and `CodinGamer.following_ids` to get information without logging in.
py
import codingame
client = codingame.Client()
codingamer = client.get_codingamer(3877165)
print(codingamer.followers_ids)
print(codingamer.following_ids)


- Add `CodinGamer.clash_of_code_rank` to get the CodinGamer’s ranking in Clash of Codes.
py
import codingame
client = codingame.Client()
codingamer = client.get_codingamer(3877165)
print(codingamer.clash_of_code_rank)


- Bug fixes
Update
Update the module by doing `pip install codingame --upgrade`
Links
PyPi: https://pypi.org/project/codingame
Docs: https://codingame.readthedocs.io/en/latest/index.html

v.0.3.4
Add support for python 3.9

0.3.3

Changelog
Add support for usernames in `Client.get_codingamer`.
py
import codingame
client = codingame.Client()
codingamer= client.get_codingamer("takos")
print(codingamer.pseudo)

Bug fixes
Update
Update the module by doing `pip install codingame --upgrade`
Links
PyPi: https://pypi.org/project/codingame
Docs: https://codingame.readthedocs.io/en/latest/index.html

Page 3 of 4

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.