Skip to main content

atomheart

A Python chess library providing a unified interface for chess board operations and move handling.

Release 0.3.1

Morpion candidate occupancy now stops after the second missing point. Ordered legal actions, symmetry orbits, terminality, successors, and the Valanga 0.3.0 dependency remain unchanged.

Release 0.3.0

This release requires Python 3.14 and the published valanga==0.3.0. It preserves the validated Morpion rules, canonical identities, checkpoints, and core game behavior, with precise generic state and undo-token contracts. The base package remains installable without either optional chess backend.

Features

  • Chess board representation and manipulation
  • Move generation and validation
  • Board modification tracking
  • Support for both Python-chess and Rust-based backends
  • FEN notation support
  • Morpion Solitaire environment (5T and 5D variants)

About

atomheart is a wrapper library that provides a unified interface over popular chess engines:

This unified interface is designed for use in chess search algorithms and AI agents, allowing seamless switching between backends for optimal performance.

See the repos

  • chipiron - Lear AI agents for chess (and maybe later other games).
  • anemone - Tree search library

Installation

pip install atomheart==0.3.1
pip install 'atomheart[chess]==0.3.1'
pip install 'atomheart[chess-rust]==0.3.1'
pip install 'atomheart[all]==0.3.1'

The base install keeps the lightweight core games available. Chess support is optional, and the Rust-backed chess board is enabled by the chess-rust extra.

Quick Start

from atomheart.board import create_board
from atomheart.board.utils import FenPlusHistory

# Create a chess board
board = create_board(
    fen_with_history=FenPlusHistory(current_fen="rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w KQkq - 0 1"),
    use_rust_boards=True
)

# Make a move
move_key = board.get_move_key_from_uci("e2e4")
board_modification = board.play_move_key(move_key)

Python 3.14 development

uv venv --python 3.14
uv pip install -e '.[test,dev,all]'
source .venv/bin/activate
tox

Core annotations use Python 3.14 deferred evaluation with runtime imports needed by typing.get_type_hints. The lazy chess/Rust factories retain string annotations so optional native types need not be imported. For these factories, annotationlib.get_annotations(..., format=annotationlib.Format.STRING) can inspect annotations without loading the optional backend.

The acting-role state classes retain their type-checking-only protocol bases to preserve slotted dataclass layout. Morpion rules, canonical move identities, checkpoint payloads and stable hashing are unchanged.

shakmaty_python_binding==0.1.5 currently needs a source build on CPython 3.14 on Linux; its published binary wheel targets CPython 3.11. The complete chess suite must be run against the actual compiled binding.

Tests, lint, and typing install valanga==0.3.0 from PyPI. CI and release workflows use the same published dependency through tox. The optional Rust binding has no established published CPython 3.14 wheel; a local source build was validated on Linux, and availability on other platforms is not guaranteed.

Metadata

Release files for atomheart 0.3.1

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

Source distribution (sdist)

Source distribution for atomheart 0.3.1
File Size Uploaded Provenance Actions
atomheart-0.3.1.tar.gz 69.7 kB With provenance Details for atomheart-0.3.1.tar.gz

Built distribution (wheel)

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

Total release size: 152.1 kB

Release files / atomheart-0.3.1.tar.gz

Download URL atomheart-0.3.1.tar.gz
Size 69.7 kB
Tags Source
SHA-256 checksum
How to use checksums
e9aef4c34e998bea7b3a0bac7cee200c1e0c874286cace38a3693630e76ec83f
BLAKE2b-256 checksum
How to use checksums
abe6f7f30439364c014a733025a90c1d073901071d10278c6042d27ace3aa63a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Nov 5, 2026.

Transparency log

Release files / atomheart-0.3.1-py3-none-any.whl

Download URL atomheart-0.3.1-py3-none-any.whl
Size 82.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
9d6a6234929028941a6ef82282b334ec94d448dcbae3ca6ecd66a0ae59a1eaa3
BLAKE2b-256 checksum
How to use checksums
233b962b364fa0c6000cb112c3d0a80826baa8a65324daca45eb4d1a2bcd541a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Nov 5, 2026.

Transparency log

Security for atomheart 0.3.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.

Full provenance

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

Select from 2 files

Attestation for atomheart-0.3.1.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 Nov 5, 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.

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