chesscompy: Extending API functionality

Sort:
Avatar of cdew4

I made a python library to extend some functionality of the Public API. Current features include:

Games by opening — filter by ECO code ("B07") or opening name substring ("Caro-Kann")
Batch fetching — concurrent multi-month game retrieval via thread pool
Time control filters — narrow results to bullet, blitz, rapid, or daily
Recent losses — walk backwards through months to find your latest losses
Player stats — current ratings and W/L/D records across all formats
PGN parsing — extract clock times, move lists, and time-pressure moves from Chess.com PGNs
Custom exceptions — PlayerNotFoundError, RateLimitError, DataGoneError so you never need to inspect raw HTTP status codes
Automatic retries — exponential backoff on 429 (rate limit) responses

Let me know if anyone has any ideas for more functionality or if you find any bugs in the package. It is currently in alpha, if anyone would like to contribute DM me or take a look at the github repo:  

Avatar of Martin_Stahl
  • Batch fetching — concurrent multi-month game retrieval via thread pool

Concurrent access is against the Public API access rules and could result in blocking anyone using that.

https://www.chess.com/announcements/view/published-data-api#pubapi-general-rate-limits

Avatar of cdew4
Martin_Stahl wrote:
  • Batch fetching — concurrent multi-month game retrieval via thread pool

Concurrent access is against the Public API access rules and could result in blocking anyone using that.

https://www.chess.com/announcements/view/published-data-api#pubapi-general-rate-limits

Understood, so for any non-serial request a 429 should be expected? Not just if it requires too much processing. I may just change this functionality to runs requests in a loop from start and end month to return multi-month results.

Avatar of Martin_Stahl

I just know what's in the documentation. 429s would happen but it's also possible if there's too many, access would be blocked completely.

Avatar of OzZarman

Hi everyone this is an interesting club, with development and animals! I look forward to contributing in done way.

Avatar of OzZarman

In 'some' way...sorry about that! What an entrance lol

Avatar of Guest3285780638
Please Sign Up to comment.

If you need help, please contact our Help and Support team.