Skip to main content

Interactive chessboard view library with optional Qt widget.

Project description

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

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.

License

This project is licensed under the Apache License 2.0.

GitHub profile: Diblo/pychessview

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pychessview-0.1.1.tar.gz (501.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pychessview-0.1.1-py3-none-any.whl (557.4 kB view details)

Uploaded Python 3

File details

Details for the file pychessview-0.1.1.tar.gz.

File metadata

  • Download URL: pychessview-0.1.1.tar.gz
  • Upload date:
  • Size: 501.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for pychessview-0.1.1.tar.gz
Algorithm Hash digest
SHA256 c0d932866a69289f7ecaee90efe18b037ccbaaad38a8cc84280ede95caeb7bcd
MD5 411c98222898aefd5e9cf9bee51aa335
BLAKE2b-256 c78c86f750d6ba66be531ae220141de49b113a762b11a4826efd57d9d7f301e3

See more details on using hashes here.

Provenance

The following attestation bundles were made for pychessview-0.1.1.tar.gz:

Publisher: publish.yml on Diblo/pychessview

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pychessview-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: pychessview-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 557.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for pychessview-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 96a682e40c04f8bdd61b2bcebcd4cc421e297258090699025a16add1c3017f8b
MD5 479c288547e8f89dcf58595b2a12212c
BLAKE2b-256 6c25ee0b5f8a60e830a77e670ba89a4173fe77c9074dba64895673983a3de30c

See more details on using hashes here.

Provenance

The following attestation bundles were made for pychessview-0.1.1-py3-none-any.whl:

Publisher: publish.yml on Diblo/pychessview

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page