Coc.py

Latest version: v3.8.1

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

Scan your dependencies

Page 1 of 9

3.8.1

Bugs Fixed:
- Fixed a bug with **kwargs in coc.Client functions that caused duplicated values

3.8.0

Additions:
~~~~~~~~~~
- Added the new Lavaloon & Electro Boots equipment to :class:`coc.EQUIPMENT`
- Added :func:`coc.Client.get_equipment`
- Added new Minion Prince hero to :class:`Hero`
- Updated static data & enums for TH17
- Added explicit cache control to every endpoint
- Use :attr:`coc.Client.lookup_cache` (default `True`) or pass it as a kwarg to API calling methods (default `None`) to control whether a lookup in the cache is performed. If `None`, it defaults to :attr:`client.lookup_cache`.
- Use :attr:`coc.Client.update_cache` to control whether the cache is updated after a request.
- Use :attr:`coc.Client.ignore_cached_errors` to specify status codes to ignore in the cache. For example, cached `404 Not Found` responses can be bypassed by setting `ignore_cached_errors=[404]`.
- Moved `cls` functionality from `EventClient` to `Client` via :func:`coc.Client.set_object_cls`
- Previously, `cls` could only be set at the `EventClient` level and applied to every event automatically. Now, it can be set directly in the normal `Client` when initializing and can override the API call if needed. This eliminates the need to change `cls` for every individual API call.

Bugs Fixed:
~~~~~~~~~~~
- Fixed a bug that would cause the first war of CWL to not appear while it was in prep & caused an index error appearing in output/logs
- :func:`coc.Client.verify_player_token` requests are no longer cached

3.7.2

Additions:
- Supercell enabled compression for all endpoints. coc.py will now request compression for every request.

3.7.1

Additions:
---
- Added the new Magic Mirror equipment to `coc.EQUIPMENT`
- updated static data

Bugs Fixed:
---
- Fixed a bug that would cause coc.py to break if a request was sent with an empty string for a tag

3.7

Add retry handling to the HTTPClient - if a request fails with a GatewayError (or TimeoutError), it will sleep and then retry for a maximum of 5 times.
Super Minion, Super Wizard, Ice Hound, Log Launcher and Invisibility Spells were added.

3.7.0

Additions:
---
- Added inheritance of classes into the docs to make it easier to see what classes inherit from others.
- Added the new `BattleModifier` to `ClanWar.battle_modifier` and `ClanWarLogEntry.battle_modifier`.
- Added the new troop and equipment in June 2024 update to the static data.

Changes:
---
- Changed the way the `ClanWar` and `ClanWarLogEntry` classes handles the `state` and `result`
attribute, respectively. It now returns a `WarState`/`WarResult` enumeration object instead of a string
to allow better type hinting and easier comparison.
- Updated the static data to reflect the June 2024 update changes.

Page 1 of 9

© 2025 Safety CLI Cybersecurity Inc. All Rights Reserved.