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 = 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']}")

# 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))

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.5.tar.gz (2.4 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.5-py3-none-any.whl (2.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: chess_variant-1.0.5.tar.gz
  • Upload date:
  • Size: 2.4 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.5.tar.gz
Algorithm Hash digest
SHA256 c6c2df8d113cec514c8cdf447cf227e2c8778dd5865f4f36e841a72f6018fc79
MD5 569b5a9455bf98bae5d3a3d69e11b6f9
BLAKE2b-256 d43d70204a45eae456b7a27dd0c5ec0a48af9a9d5e5800503c5a9f67ce94a7e7

See more details on using hashes here.

File details

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

File metadata

  • Download URL: chess_variant-1.0.5-py3-none-any.whl
  • Upload date:
  • Size: 2.6 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.5-py3-none-any.whl
Algorithm Hash digest
SHA256 dbe2df86d443b370268f31550ab3187264e93fda5a0a4178fff2fd7ce76c0c59
MD5 be2c1405ccb89b00f88c881827356d4c
BLAKE2b-256 ef92d418b49d4dbc8f412db735ff6a6ba082ee27b5c72074fb3268cee66e7dd8

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