Python bindings for the Sanqi Rust engine
Project description
sanqi-python
Python bindings for the Sanqi Rust engine.
Build
From crates/sanqi-python:
maturin develop
Or build a wheel:
maturin build
Example
import sanqi_python as sanqi
position = sanqi.Position.initial()
print(position.legal_moves()[:5])
move = position.best_move(2)
if move is not None:
svg = position.svg_for_move(move)
position.apply_move(move)
Exposed API
Position.initial()Position.empty("white" | "black")Position.legal_moves()Position.is_legal_move(move)Position.apply_move(move)Position.piece_at(square)Position.set_piece(color, square)Position.clear_square(square)Position.piece_count(color)Position.ascii_board()Position.svg_board()Position.svg_for_move(move)Position.best_move(depth)Position.evaluate()Position.outcome()Position.supporting_pivots(move)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file sanqi_python-0.1.0.tar.gz.
File metadata
- Download URL: sanqi_python-0.1.0.tar.gz
- Upload date:
- Size: 21.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4c879d97aa88c06cca6c3c811b3224527ae3245b560ac74b67e0ac0d9c39f13b
|
|
| MD5 |
31bdbc417ea3d560eb1cc04ce10aeaa6
|
|
| BLAKE2b-256 |
a24675d22a3e4837147da33988f22a36ec15089ecc7d0edcbf9611b10b71a03a
|
Provenance
The following attestation bundles were made for sanqi_python-0.1.0.tar.gz:
Publisher:
release-python.yml on curoli/sanqi
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
sanqi_python-0.1.0.tar.gz -
Subject digest:
4c879d97aa88c06cca6c3c811b3224527ae3245b560ac74b67e0ac0d9c39f13b - Sigstore transparency entry: 1248016105
- Sigstore integration time:
-
Permalink:
curoli/sanqi@b5c5c391c6db8e9a2ee0ade05f94b64463e4e4fa -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/curoli
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release-python.yml@b5c5c391c6db8e9a2ee0ade05f94b64463e4e4fa -
Trigger Event:
push
-
Statement type:
File details
Details for the file sanqi_python-0.1.0-cp312-cp312-manylinux_2_34_x86_64.whl.
File metadata
- Download URL: sanqi_python-0.1.0-cp312-cp312-manylinux_2_34_x86_64.whl
- Upload date:
- Size: 321.4 kB
- Tags: CPython 3.12, manylinux: glibc 2.34+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5c47ace96818bb968fa5877f2e447b555a3e2574d4341827742adf8994d253fe
|
|
| MD5 |
d7a98ccc83cb79e36a5231410add532c
|
|
| BLAKE2b-256 |
29a8cff14f35248b994e12b7fba9eeb6a57bec32d356525ba4319fd3e49b2974
|
Provenance
The following attestation bundles were made for sanqi_python-0.1.0-cp312-cp312-manylinux_2_34_x86_64.whl:
Publisher:
release-python.yml on curoli/sanqi
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
sanqi_python-0.1.0-cp312-cp312-manylinux_2_34_x86_64.whl -
Subject digest:
5c47ace96818bb968fa5877f2e447b555a3e2574d4341827742adf8994d253fe - Sigstore transparency entry: 1248016155
- Sigstore integration time:
-
Permalink:
curoli/sanqi@b5c5c391c6db8e9a2ee0ade05f94b64463e4e4fa -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/curoli
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release-python.yml@b5c5c391c6db8e9a2ee0ade05f94b64463e4e4fa -
Trigger Event:
push
-
Statement type: