Skip to main content

Pychessview

Pychessview is a Python library for building interactive chessboard UIs without coupling presentation logic to a specific GUI framework or chess engine.

The project is published as a single PyPI distribution:

  • pychessview: core package providing board state, layout, rendering, interaction handling, themes, and the public view API
  • pychessview.qt: optional Qt integration module enabled through the qt extra

Requirements

  • Python 3.11 or newer
  • Core runtime dependencies installed automatically with pychessview
  • For Qt widget support, PySide6 is required

Install only the core package when no GUI backend is needed:

pip install pychessview

Install the optional Qt widget support when using PySide:

pip install "pychessview[qt]"

The core package defines rendering contracts, game/session orchestration, and interaction behavior while remaining backend-agnostic. The optional Qt module builds on this foundation with QtRenderer, QtControllerAdapter, and ChessboardWidget.

This design enables reusable and extensible chessboard UIs for applications such as chess GUIs, analysis tools, and training software, where the UI layer remains independent from the underlying game implementation.

Quick Start

Qt provides the simplest way to render a chessboard:

from PySide6.QtWidgets import QApplication

from pychessview import StandardChessFactory
from pychessview.qt import ChessboardWidget


def main() -> int:
    app = QApplication.instance() or QApplication([])

    widget = ChessboardWidget(game_spec=StandardChessFactory.create_game_spec())
    widget.resize(640, 640)
    widget.show()

    return app.exec()

The core package can also be used without Qt by providing a pychessview.RendererProtocol implementation and initializing pychessview.View directly.

Documentation

  • Engine Guide: backend-agnostic engine usage with View, GameSpec, themes, and renderers
  • Qt Widget Guide: widget construction, state access, and Qt-specific behavior
  • Development Guide: workspace layout, architecture, tooling, and test conventions

Example

A runnable Qt example is available at examples/qt_demo.py.

Chessboard preview

The Qt example supports these interactions:

  • Use the left mouse button to select, move, and drag pieces.
  • Use Shift, Ctrl, or Alt with the left mouse button to add a circle or arrow.
  • Use the right mouse button to delete a circle or arrow.

License

This project is licensed under the Apache License 2.0.

GitHub profile: Diblo/pychessview

Metadata

Release files for pychessview 0.2.0

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

Source distribution (sdist)

Source distribution for pychessview 0.2.0
File Size Uploaded Provenance Actions
pychessview-0.2.0.tar.gz 501.9 kB With provenance Details for pychessview-0.2.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for pychessview 0.2.0
File Interpreter ABI Platform Actions
pychessview-0.2.0-py3-none-any.whl Python 3 none any Details for pychessview-0.2.0-py3-none-any.whl

Total release size: 1.1 MB

Release files / pychessview-0.2.0.tar.gz

Download URL pychessview-0.2.0.tar.gz
Size 501.9 kB
Tags Source
SHA-256 checksum
How to use checksums
e246a0f9da804f1b90a85995c050ad4cd11e9d8db3d5d71b56051ba01c93bfaf
BLAKE2b-256 checksum
How to use checksums
638f2354b50b80327e7a107ed42374622ea87b671a0359391120f7718e3bf655
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Apr 26, 2026.

Transparency log

Release files / pychessview-0.2.0-py3-none-any.whl

Download URL pychessview-0.2.0-py3-none-any.whl
Size 557.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d0623ef5fb50e38f0349b99917b110b32604ca5cd3038711708ca80c45c62d01
BLAKE2b-256 checksum
How to use checksums
8151647fa4025f012ac8a9d68d3bc5e54f9e8b4c601c705d891e2f8dc8dd3f2f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Apr 26, 2026.

Transparency log

Security for pychessview 0.2.0

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.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for pychessview-0.2.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Apr 26, 2026.

Transparency log

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.

Release history Release notifications | RSS feed

This release

0.2.0 This release

2 release files Full provenance

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