Chess Pressure
A web application that visualizes pressure maps on a chess board -- showing which squares are controlled by white vs. black across every move of a game.
What is "pressure"?
For each square on the board, pressure is the net number of pieces attacking it. Positive values mean white controls the square; negative means black does. Two modes are available:
- Unweighted -- each attacking piece contributes +1 or -1.
- Weighted -- each attacking piece contributes its material value (pawn=1, knight/bishop=3, rook=5, queen=9, king=1).
Features
- Step through famous built-in games move by move and watch the pressure heatmap evolve.
- Upload your own PGN to analyze any game.
- Make moves from any position and see legal moves + pressure updates in real time.
- FastAPI backend with a lightweight static frontend.
Built-in Games
| Game | Year | White | Black |
|---|---|---|---|
| The Immortal Game | 1851 | Anderssen | Kieseritzky |
| The Opera Game | 1858 | Morphy | Duke of Brunswick & Count Isouard |
| Kasparov's Immortal | 1999 | Kasparov | Topalov |
| Fischer vs Spassky, Game 6 | 1972 | Fischer | Spassky |
| Kasparov vs Deep Blue, Game 2 | 1997 | Deep Blue | Kasparov |
Quickstart
# Install dependencies
pip install fastapi uvicorn python-chess
# Run the server
python -m chess_pressure.app
The app starts on http://localhost:8888.
API
| Method | Endpoint | Description |
|---|---|---|
| GET | /api/games |
List built-in games |
| GET | /api/games/{id} |
Load a built-in game (headers, moves, pressure frames) |
| POST | /api/parse |
Parse a PGN string ({"pgn": "..."}) |
| GET | /api/legal?fen=... |
Get legal moves for a FEN position |
| POST | /api/move |
Make a move ({"fen": "...", "uci": "e2e4"}) |
Project Structure
chess_pressure/
__init__.py
app.py # FastAPI routes and static file serving
engine.py # Pressure computation, PGN parsing, move logic
games.py # Built-in famous games (PGN data)
License
MIT
Metadata
Release files for chess-pressure 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| chess_pressure-0.1.1.tar.gz | 64.6 kB | Without provenance | Details for chess_pressure-0.1.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| chess_pressure-0.1.1-py3-none-any.whl | Python 3 | none | any | Details for chess_pressure-0.1.1-py3-none-any.whl |
Total release size: 120.2 kB
Release files / chess_pressure-0.1.1.tar.gz
| Download URL | chess_pressure-0.1.1.tar.gz |
|---|---|
| Size | 64.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
944f37cf90fb591cb720f6bc07add1e6740231f25c49048f8965acc66cf729c3
|
|
BLAKE2b-256 checksum How to use checksums |
df7688be603d75d1b55b580ed02dae155338c508efe1e8dc08ece060993290de
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.9.25 {"installer":{"name":"uv","version":"0.9.25","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Release files / chess_pressure-0.1.1-py3-none-any.whl
| Download URL | chess_pressure-0.1.1-py3-none-any.whl |
|---|---|
| Size | 55.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
a62dd71feedfc41ff29930a75a093b378371f1685dfa0385d828f1da47b7bde5
|
|
BLAKE2b-256 checksum How to use checksums |
62b24055478f1bddae30066fbad994cd514f2695f3874259ab932896992da195
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.9.25 {"installer":{"name":"uv","version":"0.9.25","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Security for chess-pressure 0.1.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.