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 5 of 9

2.2.3

The release fixes some doc issues and the siege levels not reporting correctly. 144

2.2.2

Merging a few PRs and Issues. Other others did not fit in this PR, so I am going to put them in their own PR.

**Fixes**
- Realtime access 149
- Add super miner 150 and 151
- Fixed calendar issue 148
- Fixed calculation of war attacks 146

2.2.1

Bugs Fixed:

- Moved "Recall Spell" at the end of elixir spells (rather than end of all spells)

- Fixed a bug with CWL where the final war can be retrieved properly on the last day as `current_war`

- Fixed bug with iterators and comparing clan tags to skip wars.


This release includes:
`138 <https://github.com/mathsman5133/coc.py/pull/138>`_,
`139 <https://github.com/mathsman5133/coc.py/pull/139>`_,
`140 <https://github.com/mathsman5133/coc.py/pull/140>`_,

2.2.0

This update has quite a bit of change without breaking backward compatibility.

For starters, support for the context manager was added 121 allowing the use of
py
async def main():
async with coc.Client() as client:
do stuff...

if __name__ == "__main__":
asyncio.run(main())


Additionally, with the release of CapitalRaidSeasons we needed to improve the performance of fetching warlogs and capital raid logs. Previously, all records available from the API were fetched when in most cases, folks just needed the newest data. A `limit` parameter has been added to both `get_warlog` and `get_raidlog`.

Additionally, support for `async for warlog` has been added with the ability to fetch more data if needed.

py
raid_logs = await client.get_raidlog(clan_tag, page=True, limit=5)

Set `paginate=True` to enable fetching beyond the limit value until
there are more values to fetch
count = 0
async for i in raid_with_page:
print(f"[{count}]-async limit: 5 page: True {i.start_time.time}")
count += 1


This PR includes:
122
121
130
131

2.1.3

Minor release fixes the order of pets from `Player.hero_pets`

2.1.2

The update contains updates from the TH15 release.

- Update troops, spells, and pet orders
- Update static json files
- Added script to automate updating the json files
- Removed the ResourceCost key from the json files

Page 5 of 9

© 2025 Safety CLI Cybersecurity Inc. All Rights Reserved.