--- id: python-chess version: "1.999" license: GPL-3.0+ license_treatment: copyleft maintenance: active --- # python-chess — A chess library with move generation, move validation, and support for common formats. License: copyleft · Maintenance: active · Downloads: 6.0M/mo ## What it is and what it does python-chess is a pure-Python library for representing, validating, and manipulating chess games. It handles standard chess and multiple variants (Chess960, Atomic, Crazyhouse, etc.), generates legal moves, detects game-ending conditions (checkmate, stalemate, draws), and parses/generates common chess formats like FEN, PGN, EPD, and SAN notation. The library also integrates with opening books (Polyglot), endgame tablebases (Syzygy and Gaviota), and external UCI/XBoard chess engines for analysis and play. The package is primarily used for chess analysis tools, game replay systems, engine interfaces, and educational chess applications. It has low install friction as a pure-Python wheel but carries a GPL-3.0+ copyleft license that restricts use in proprietary software. The codebase shows recent repository activity, but the latest PyPI release dates to 2020, and the package is marked as inactive in its classifiers, creating uncertainty about ongoing maintenance and support. Use it for: - Analyze chess games by parsing PGN files and replaying moves with full move validation and game-state detection. - Build a chess engine interface to communicate with UCI engines like Stockfish for position evaluation and move suggestions. - Generate legal moves and validate user input in a chess application or game UI. - Probe endgame tablebases (Syzygy or Gaviota) to determine optimal play in simplified positions. - Read opening books in Polyglot format to suggest common opening moves from a database. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. python-chess provides move generation, move validation, and board representation for chess games, with support for standard and variant chess rules, PGN/FEN/EPD formats, opening books, endgame tablebases, and UCI engine communication. Yes, with conditions. The library is feature-complete for standard chess programming tasks and has no known vulnerabilities. However, the GPL-3.0+ copyleft license is a hard blocker for proprietary projects, and the gap between the latest release (2020-10-26) and current date raises questions about maintenance responsiveness. Install only if you need GPL-compatible licensing and can tolerate potential delays in bug fixes or updates. ## Install pip install python-chess uv add python-chess poetry add python-chess ## Installing python-chess Before you install: Low install friction with a pure-Python wheel distribution. However, the package is marked as inactive (Development Status 7) despite an active repository; the latest release is from 2020-10-26, over five years old, which may indicate maintenance has stalled even though the repository shows recent commits. License in practice: Licensed under GPL-3.0+, a copyleft license requiring any derivative work or distribution to also be open-source under compatible terms. This is a significant constraint for proprietary or closed-source projects. Quickstart: pip install chess import chess board = chess.Board() board.push_san("e4") print(board) Requires Python 3.8+ according to the documentation excerpt. Verify before relying: - Whether the package is actively maintained despite the 2020 release date and 'Inactive' classifier conflicting with recent repository commits. - Current Python version support beyond the 3.8+ minimum mentioned in the excerpt. - Whether all documented features (Polyglot, Syzygy, Gaviota, UCI engines) are fully functional in version 1.999. ## Package facts - License: GPL-3.0+ (copyleft) - Python support: unspecified - Install friction: low - Maintenance: active - Downloads: 6.0M/month (top 5,000 on PyPI) - Known vulnerabilities: none known ## Tags chess board representation, move generation validation, pgn parser, chess engine communication, chess game analysis, fen notation, chess variants, chess-game-logic, game-development, copyleft-licensed [View on SkillFed](https://skillfed.io/packages/python-chess) · [View on PyPI](https://pypi.org/project/python-chess/)