
Security News
Another Round of TEA Protocol Spam Floods npm, But It’s Not a Worm
Recent coverage mislabels the latest TEA protocol spam as a worm. Here’s what’s actually happening.
pgn-to-sqlite
Advanced tools
A CLI application for pulling PGN files from Chess.com and Lichess.org and saving your games into a SQLite database.
It can also be used to save PGN files from a local folder to a SQLite database.
Python 3.10 or higher is required.
It is recommended that you install this package in a virtual or isolated environment. The easiest way to do this is with uv:
uv tool install pgn_to_sqlite
Alternatively, you can install it with pipx:
pipx install pgn_to_sqlite
Or with pip:
pip install pgn_to_sqlite
Usage: pgn-to-sqlite [OPTIONS] COMMAND [ARGS]...
Save your chess games to a SQLite database.
You can `fetch` your games from chess.com or lichess.org. You can also
`save` local PGN files to the database.
Options:
-u, --user TEXT Your username for the chess site.
-o, --output FILE Where you would like your database saved. [required]
--help Show this message and exit.
Commands:
fetch Fetch all games from the requested site.
save Save all PGN files from the given folder.
To download, parse, and save your games, both --user and --output are required. The fetch command accepts either chess or lichess as an argument for Chess.com and Lichess.org respectively.
Example:
pgn-to-sqlite -u endlesstrax -o games.db fetch lichess
Note: If you've played a lot of games, be patient—it could take a minute or two to download and process them all.
To save games from local PGN files to your database, only --output is required. The save command expects a folder path as an argument.
Example:
pgn-to-sqlite -o games.db save ./chess/games/
This project uses uv for dependency management and development workflows.
Install uv if you haven't already:
pip install uv
Clone the repository:
git clone https://github.com/EndlessTrax/pgn-to-sqlite.git
cd pgn-to-sqlite
Sync dependencies and set up the virtual environment:
uv sync
Run the test suite with:
uv run pytest
For coverage reporting:
uv run pytest --cov
This project uses Ruff for linting and formatting:
# Check for issues
uv run ruff check .
# Format code
uv run ruff format .
To build the package:
uv build
Contributions are welcome! Please follow these guidelines:
File an issue first - Before making a PR, please file an issue so the implementation can be discussed. This saves time and increases the chances of your PR being merged without significant changes.
Lint and format your code - Use uv run ruff check . and uv run ruff format . to ensure your code follows the project's style guidelines.
Include tests - Please include tests for any code changes (unless current tests already cover your contribution).
Update documentation - If your changes affect usage, please update the README accordingly.
This project is licensed under the MIT License - see the LICENSE file for details.
If you find this project useful and would like to show your support, you can:
FAQs
Pull your Chess games from chess.com and lichess.org into a sqlite3 database.
We found that pgn-to-sqlite demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Recent coverage mislabels the latest TEA protocol spam as a worm. Here’s what’s actually happening.

Security News
PyPI adds Trusted Publishing support for GitLab Self-Managed as adoption reaches 25% of uploads

Research
/Security News
A malicious Chrome extension posing as an Ethereum wallet steals seed phrases by encoding them into Sui transactions, enabling full wallet takeover.