A Python API wrapper for Fairyground Variant Challenge.
Project description
Chess Variant Python SDK
The absolute easiest way to create, view, and list chess variants via Python.
Powered by Fairyground Variant Challenge.
Installation
pip install chess-variant
Basic Usage
import chess_variant
# 1. Start a game instantly
game_url = chess_variant.play("3check")
print(f"Play your game here: {game_url}")
# 2. View board state/FEN ('123456' is the roomId)
state = chess_variant.view("123456")
print(f"Current FEN: {state['fen']}")
# 3. List all active game rooms
all_rooms = chess_variant.rooms()
print(f"Currently {len(all_rooms)} active games!")
# 4. Get the move list for a game
move_list = chess_variant.moves("123456")
print(f"Moves played: {move_list}")
# 5. Get the PGN for a game
print(chess_variant.pgn("123456"))
# 6. List all available variants
all_variants = chess_variant.variants()
print(f"Supported variants: {list(all_variants['variants'].keys())[:5]}...")
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
chess_variant-1.0.3.tar.gz
(2.2 kB
view details)
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 chess_variant-1.0.3.tar.gz.
File metadata
- Download URL: chess_variant-1.0.3.tar.gz
- Upload date:
- Size: 2.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bd42e17127ab5d1cf179158c9b2eb9283cc5db72c89b86d093f31bf1d7452e91
|
|
| MD5 |
ebcc8a61b798807c4cbbda0229190727
|
|
| BLAKE2b-256 |
5a905c3b2c1f179328f1f28c6ad171a0b2aeea3d7ecadd286b00c8df2f731551
|
File details
Details for the file chess_variant-1.0.3-py3-none-any.whl.
File metadata
- Download URL: chess_variant-1.0.3-py3-none-any.whl
- Upload date:
- Size: 2.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
97a6a1245131ed8084a4ccfe4fbafd939ef584d74f040b2e87761a7491644725
|
|
| MD5 |
a76878d700d07160203cc95d5b16a06f
|
|
| BLAKE2b-256 |
8d443269f977195b57cbd364202b692406f75ffe2c627086ae615186d3d6ccad
|