Chess-Analytica: chess analytics made easy
=============================================================================================
.. image:: https://img.shields.io/pypi/v/chess-analytica
:target: https://pypi.org/project/chess-analytica/
:alt: PyPI
.. image:: https://static.pepy.tech/badge/chess-analytica
:target: https://pepy.tech/project/chess-analytica
:alt: Downloads
.. image:: https://readthedocs.org/projects/chess-analytica/badge/?version=latest
:target: https://chess-analytica.readthedocs.io/en/latest/
:alt: Docs
.. image:: https://img.shields.io/pypi/l/chess-analytica
:target: https://pypi.org/project/chess-analytica/
:alt: License
.. image:: https://img.shields.io/pypi/status/chess-analytica
:target: https://pypi.org/project/chess-analytica/
:alt: Status
.. image:: https://github.com/AronFrish/Chess-Analytica/actions/workflows/test.yml/badge.svg
:target: https://github.com/AronFrish/Chess-Analytica/actions/workflows/test.yml
:alt: 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.
.. code:: python
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:
.. code:: python
pip install chess-analytica
`Documentation <https://chess-analytica.readthedocs.io/en/latest/>`__
---------------------------------------------------------------------------------------------
* `Examples <https://chess-analytica.readthedocs.io/en/latest/usage.html>`_
* `ChessDotCom Class <https://chess-analytica.readthedocs.io/en/latest/chessdotcom.html>`_
* `Board Class <https://chess-analytica.readthedocs.io/en/latest/board.html>`_
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.
Raw data
{
"_id": null,
"home_page": "https://github.com/AronFrish/Chess-Analytica",
"name": "chess-analytica",
"maintainer": "",
"docs_url": null,
"requires_python": "",
"maintainer_email": "",
"keywords": "",
"author": "Aron Frishberg",
"author_email": "frishberg@uchicago.edu",
"download_url": "https://files.pythonhosted.org/packages/b1/ed/e7d5eabce6f4c8c51f1bdaf37d750528a6e848835883cc138cbf04fe8817/chess-analytica-1.2.4.tar.gz",
"platform": null,
"description": "Chess-Analytica: chess analytics made easy\n=============================================================================================\n\n.. image:: https://img.shields.io/pypi/v/chess-analytica\n :target: https://pypi.org/project/chess-analytica/\n :alt: PyPI\n\n.. image:: https://static.pepy.tech/badge/chess-analytica\n :target: https://pepy.tech/project/chess-analytica\n :alt: Downloads\n\n.. image:: https://readthedocs.org/projects/chess-analytica/badge/?version=latest\n :target: https://chess-analytica.readthedocs.io/en/latest/\n :alt: Docs\n\n.. image:: https://img.shields.io/pypi/l/chess-analytica\n :target: https://pypi.org/project/chess-analytica/\n :alt: License\n\n.. image:: https://img.shields.io/pypi/status/chess-analytica\n :target: https://pypi.org/project/chess-analytica/\n :alt: Status\n\n.. image:: https://github.com/AronFrish/Chess-Analytica/actions/workflows/test.yml/badge.svg\n :target: https://github.com/AronFrish/Chess-Analytica/actions/workflows/test.yml\n :alt: Tests\n\nIntroduction\n------------\n\n**Chess-Analytica** is a chess library that allows for the simple scraping of data using the chess.com API, and subsequent \nanalysis of that data. Built on top of the python-chess library, Chess-Analytica allows for you to easily scrape \nall of a given player's past (or current) games, filter the games down, and then analyze them.\n\n.. code:: python\n\n from chess_analytica import Board, ChessDotCom\n\n profile = ChessDotCom.Profile(\"aronfrish\", False)\n\n profile.filterGameType(\"rapid\")\n\n print(len(profile.games)) #720\n\n n = 0\n for game in profile.games : #Note: this is still filtered to rapid\n if (\"resignation\" in game.termination) :\n n += 1\n print(n) #Note: this will print the number of the player's rapid games that ended in resignation\n #334\n\n 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)\n 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\n #0.013888888888888888\n\nInstalling\n----------\n\nDownload and install the latest release:\n\n.. code:: python\n\n pip install chess-analytica\n\n\n`Documentation <https://chess-analytica.readthedocs.io/en/latest/>`__\n---------------------------------------------------------------------------------------------\n* `Examples <https://chess-analytica.readthedocs.io/en/latest/usage.html>`_\n* `ChessDotCom Class <https://chess-analytica.readthedocs.io/en/latest/chessdotcom.html>`_\n* `Board Class <https://chess-analytica.readthedocs.io/en/latest/board.html>`_\n\nFeatures\n--------\n\n* Scrape all game info from a given player's profile\n\n* Simulate games and analyze them\n\n* Filter games by time control\n\nLicense\n-------\n\nChess-Analytica is licensed under the MIT License.\nCheck out ``LICENSE.txt`` for the full text.\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "Making chess analytics easy.",
"version": "1.2.4",
"project_urls": {
"Documentation": "https://chess-analytica.readthedocs.io",
"Homepage": "https://github.com/AronFrish/Chess-Analytica"
},
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "280f3807634de125a780a63c5b8fb4a393f71aa6c0722c5680594d865652c2b2",
"md5": "d76f208709e7ee20877774a8f8533ed7",
"sha256": "3e6262619c2ff6e580abb0c260f6230cd35a4390ecf66836fe86b299d3911d5c"
},
"downloads": -1,
"filename": "chess_analytica-1.2.4-py3-none-any.whl",
"has_sig": false,
"md5_digest": "d76f208709e7ee20877774a8f8533ed7",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": null,
"size": 11204,
"upload_time": "2023-11-20T02:51:05",
"upload_time_iso_8601": "2023-11-20T02:51:05.693078Z",
"url": "https://files.pythonhosted.org/packages/28/0f/3807634de125a780a63c5b8fb4a393f71aa6c0722c5680594d865652c2b2/chess_analytica-1.2.4-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "b1ede7d5eabce6f4c8c51f1bdaf37d750528a6e848835883cc138cbf04fe8817",
"md5": "d897d8b35aa076649a49c1682bf8a6ae",
"sha256": "a4d254bf1ecaee4c4e230dd83a478eacda2b844c0a402dabcd581838990a76f9"
},
"downloads": -1,
"filename": "chess-analytica-1.2.4.tar.gz",
"has_sig": false,
"md5_digest": "d897d8b35aa076649a49c1682bf8a6ae",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 12173,
"upload_time": "2023-11-20T02:51:07",
"upload_time_iso_8601": "2023-11-20T02:51:07.298556Z",
"url": "https://files.pythonhosted.org/packages/b1/ed/e7d5eabce6f4c8c51f1bdaf37d750528a6e848835883cc138cbf04fe8817/chess-analytica-1.2.4.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-11-20 02:51:07",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "AronFrish",
"github_project": "Chess-Analytica",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"requirements": [
{
"name": "chess",
"specs": []
},
{
"name": "urllib3",
"specs": []
}
],
"lcname": "chess-analytica"
}