{"repo":"guidopetri/chess-pipeline","free":true,"listed":false,"github":"https://github.com/guidopetri/chess-pipeline","clone":"git clone https://github.com/guidopetri/chess-pipeline.git","description":"Pulling games from the Lichess API into a PostgreSQL database for data analysis.","language":"Python","stars":19,"topics":["python","postgresql","chess","luigi-pipeline"],"license":"GPL-3.0","category":"databases-storage","readme_excerpt":"Chess games pipeline This is a simple scripting package to pull games from Lichess into a PostGreSQL database. Requirements In order to run it, the following Python packages are required: - luigi - psycopg2 - pandas - python-chess - python-lichess A PostGreSQL server must also be set up properly. The data is written to a table with the format listed in chess games.sql . Gathering chess data To gather data from Lichess, run the following command with the location of chess pipeline.py in your PYTHONPATH: luigi --module chess pipeline CopyGames By default, the script pulls Blitz games from the last two days for the user thibault . This can be changed by passing in the following arguments: - --player , for the chess player - --perf-type , for the kind of chess game - bullet, blitz, classical, etc. - --since , for since when to pull. This is given in Unix time. - --single-day , if only a single day is to be pulled from the API (this is a boolean flag) The above can also be added to your crontab , as long as your PATH and PYTHONPATH are set up correctly. The script defaults to writing to a (main) table called chess games . It also writes to tables called game clocks , game evals , and game moves for the clock information, the computer evaluation of the position, and the moves made in the game, respectively. In order to access these tables, a section named postgres cfg in your luigi.cfg file containing the following keys must exist: - user , the PostGreSQL user to log in as - passwo","default_branch":null,"files":null,"tree":[],"storefront":"/r/guidopetri","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/guidopetri/chess-pipeline/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}