Skip to main content
PyPI Downloads Docs License Status Tests

Introduction

Chess-Analytica is a chess library that allows for the simple scraping of data using the chess.com API, and subsequent analysis of that data. Built on top of the python-chess library, Chess-Analytica allows for you to easily scrape all of a given player’s past (or current) games, filter the games down, and then analyze them.

from chess_analytica import Board, ChessDotCom

profile = ChessDotCom.Profile("aronfrish", False)

profile.filterGameType("rapid")

print(len(profile.games)) #720

n = 0
for game in profile.games : #Note: this is still filtered to rapid
if ("resignation" in game.termination) :
    n += 1
print(n) #Note: this will print the number of the player's rapid games that ended in resignation
#334

italian_games = profile.find_games_with_FEN_and_Color("r1bqkbnr/pppp1ppp/2n5/4p3/2B1P3/5N2/PPPP1PPP/RNBQK2R", True) #Note: this FEN is the italian game and the target player color is white (because is_white is set to True)
print(len(italian_games)/len(profile.white_games)) #Note: this will print the percentage of rapid games (where the player is white) that the player has played the italian game
#0.013888888888888888

Installing

Download and install the latest release:

pip install chess-analytica

Documentation

Features

  • Scrape all game info from a given player’s profile

  • Simulate games and analyze them

  • Filter games by time control

License

Chess-Analytica is licensed under the MIT License. Check out LICENSE.txt for the full text.

Metadata

Release files for chess-analytica 1.2.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for chess-analytica 1.2.4
File Size Uploaded
chess-analytica-1.2.4.tar.gz 12.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for chess-analytica 1.2.4
File Interpreter ABI Platform
chess_analytica-1.2.4-py3-none-any.whl Python 3 none any Details

Total release size: 23.4 kB

Release files / chess-analytica-1.2.4.tar.gz

Download URL chess-analytica-1.2.4.tar.gz
Size 12.2 kB
Tags Source
SHA-256 checksum
How to use checksums
a4d254bf1ecaee4c4e230dd83a478eacda2b844c0a402dabcd581838990a76f9
BLAKE2b-256 checksum
How to use checksums
b1ede7d5eabce6f4c8c51f1bdaf37d750528a6e848835883cc138cbf04fe8817
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.12.0

Release files / chess_analytica-1.2.4-py3-none-any.whl

Download URL chess_analytica-1.2.4-py3-none-any.whl
Size 11.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
3e6262619c2ff6e580abb0c260f6230cd35a4390ecf66836fe86b299d3911d5c
BLAKE2b-256 checksum
How to use checksums
280f3807634de125a780a63c5b8fb4a393f71aa6c0722c5680594d865652c2b2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.12.0

Release history Release notifications | RSS feed

This release

1.2.4 This release

2 release files

1.2.2

2 release files

1.2.1

2 release files

1.2.0

2 release files

1.1.9

2 release files

1.1.8

2 release files

1.1.7

2 release files

1.1.6

2 release files

1.1.5

2 release files

1.1.4

2 release files

1.1.3

2 release files

1.1.2

2 release files

1.1.1

2 release files

1.1.0

2 release files

1.0.9

2 release files

1.0.8

2 release files

1.0.7

2 release files

1.0.6

2 release files

1.0.5

2 release files

1.0.4

2 release files

1.0.3

2 release files

1.0.2

2 release files

1.0.1

2 release files

1.0.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page