Skip to main content

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 = chess_variant.play("3check")

# Get any link or ID easily!
print(f"Room ID:   {game.id}")
print(f"White URL: {game.white}")
print(f"Black URL: {game.black}")
print(f"Game URL:  {game.url}")

# 2. View board state/FEN
state = chess_variant.view(game.id)
print(f"Current FEN: {state['fen']}")

# 2b. Get full room snapshot (same payload as /api/game/:roomId)
snapshot = chess_variant.room(game.id)
print(snapshot)

# 2c. Or fetch via Room instance
print(game.state())

# 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(game.id)
print(f"Moves played: {move_list}")

# 5. Get the PGN for a game
print(chess_variant.pgn(game.id))

Metadata

Release files for chess-variant 1.0.7

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

Source distribution (sdist)

Source distribution for chess-variant 1.0.7
File Size Uploaded Provenance Actions
chess_variant-1.0.7.tar.gz 2.7 kB Without provenance Details for chess_variant-1.0.7.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for chess-variant 1.0.7
File Interpreter ABI Platform Actions
chess_variant-1.0.7-py3-none-any.whl Python 3 none any Details for chess_variant-1.0.7-py3-none-any.whl

Total release size: 5.5 kB

Release files / chess_variant-1.0.7.tar.gz

Download URL chess_variant-1.0.7.tar.gz
Size 2.7 kB
Tags Source
SHA-256 checksum
How to use checksums
97fa9bb711e2b676b2585f91c5fff9582fe79680fc58f1e07685bed1bfc91c58
BLAKE2b-256 checksum
How to use checksums
8c2cab2be48652958271e160692c55b20583bf055eb74364d0de60e66f7bdda5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.9.6

Release files / chess_variant-1.0.7-py3-none-any.whl

Download URL chess_variant-1.0.7-py3-none-any.whl
Size 2.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
3972743dc7a27ed00c8a3ac8127c9ee226aa4e07eeebe1ab85a22eff6f6d127e
BLAKE2b-256 checksum
How to use checksums
5d951e17d0b2bdd640bd7443e43b0124db61537b2f40fade588a431e4f4e68b9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.9.6

Security for chess-variant 1.0.7

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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

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