Skip to main content

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.4.tar.gz (2.3 kB view details)

Uploaded Source

Built Distribution

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

chess_variant-1.0.4-py3-none-any.whl (2.4 kB view details)

Uploaded Python 3

File details

Details for the file chess_variant-1.0.4.tar.gz.

File metadata

  • Download URL: chess_variant-1.0.4.tar.gz
  • Upload date:
  • Size: 2.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.3

File hashes

Hashes for chess_variant-1.0.4.tar.gz
Algorithm Hash digest
SHA256 37b65f9786a8107b75abce3953f9f0c50372de1dfb8aa6376daa0684f32edff1
MD5 4747de4ba91a61812bc0a2a337d085b3
BLAKE2b-256 c0521fdf36a67b15480e7ccc44ff4afb47a9544a9ec62cc4e74786b90af3269a

See more details on using hashes here.

File details

Details for the file chess_variant-1.0.4-py3-none-any.whl.

File metadata

  • Download URL: chess_variant-1.0.4-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

Hashes for chess_variant-1.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 579fc49604e28646d4e97b8ff5884b01103d05081aab44448b041d9c0cb123db
MD5 9b55d38a8ea7b56f08d9beedcad21a4a
BLAKE2b-256 6474e457cc9ed9c0c9a73c30b2a420eeb00097afa03698f61545986072452b21

See more details on using hashes here.

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