stockfish
Wraps the open-source Stockfish chess engine for easy integration into python.
Decision gist · record as of 2026-08-14
Yes. The package is actively maintained, has no Python dependencies, carries a permissive MIT license, and solves a clear problem—wrapping Stockfish without forcing you to parse UCI protocol yourself. The only real prerequisite is installing the Stockfish binary separately, which is documented. Use it if you need chess engine integration in Python.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- You must install the Stockfish engine binary separately on your system and provide its path to the Stockfish class constructor.
- Low friction install as a pure Python wheel with no runtime dependencies, though you must separately install the Stockfish engine binary on your system.
- Actively maintained with recent commits and production-stable status.
License · maintenance · safety
MIT (permissive) — MIT license permits commercial and private use with minimal restrictions—you may use, modify, and distribute this wrapper freely as long as you include the license notice.
last release 2026-04-17 (119 days) · last repo commit 2026-06-12 · 48 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 4,934,269 downloads/mo, #2,197 on PyPI
Alternatives
Verify before relying
pip install stockfish
from stockfish import Stockfish
stockfish = Stockfish(path="/path/to/stockfish/binary")
stockfish.set_fen_position("rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w KQkq - 0 1")
print(stockfish.get_best_move())- Whether the wrapper supports all Stockfish versions or has known compatibility constraints beyond Python 3.10+.
- Performance characteristics when running on systems with limited CPU cores or memory.
- Whether Chess960 support is fully tested and production-ready.
What it is and what it does
Stockfish is a Python wrapper around the open-source Stockfish chess engine, letting you query move analysis, position evaluation, and legality checking from Python without building your own UCI protocol handler. It manages the engine process, translates Python method calls into UCI commands, and parses engine output back into Python objects—dictionaries for move info, strings for moves, booleans for validation.
You initialize it with a path to the Stockfish binary, then call methods like `get_best_move()`, `get_top_moves()`, `set_fen_position()`, and `is_move_legal()` to interact with the engine. The wrapper handles engine configuration (threads, hash size, skill level, search depth) through a parameters dictionary, letting you tune strength and speed. It requires Python 3.10 or later and has no Python runtime dependencies—only the external Stockfish binary.
Use it for
- Build a chess puzzle solver or analysis tool that evaluates positions and suggests best moves.
- Create a chess game with computer opponent by querying Stockfish for move recommendations at configurable strength levels.
- Validate chess moves and positions in a game engine or notation parser without manual rule implementation.
- Analyze chess games in bulk by setting positions via FEN and extracting evaluation scores and top-move rankings.
- Develop a chess training application that shows engine evaluation and mate-in-N calculations for learning.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes.
The package is actively maintained, has no Python dependencies, carries a permissive MIT license, and solves a clear problem—wrapping Stockfish without forcing you to parse UCI protocol yourself. The only real prerequisite is installing the Stockfish binary separately, which is documented. Use it if you need chess engine integration in Python.
Install
stockfish on PyPI
Before you install
Low friction install as a pure Python wheel with no runtime dependencies, though you must separately install the Stockfish engine binary on your system. Actively maintained with recent commits and production-stable status.
You must install the Stockfish engine binary separately on your system and provide its path to the Stockfish class constructor.
License in practice
MIT license permits commercial and private use with minimal restrictions—you may use, modify, and distribute this wrapper freely as long as you include the license notice.
Quickstart
pip install stockfish
from stockfish import Stockfish
stockfish = Stockfish(path="/path/to/stockfish/binary")
stockfish.set_fen_position("rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w KQkq - 0 1")
print(stockfish.get_best_move())
Verify before relying
- Whether the wrapper supports all Stockfish versions or has known compatibility constraints beyond Python 3.10+.
- Performance characteristics when running on systems with limited CPU cores or memory.
- Whether Chess960 support is fully tested and production-ready.
Package facts
| License | MIT permissive |
| Python support | Supports the current Python release >=3.10 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | None |
| Maintenance | Actively maintained 119 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 4,934,269 / month, #2,197 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Development Status :: 5 - Production/StableNatural Language :: EnglishOperating System :: UnixProgramming Language :: PythonProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Programming Language :: Python :: Implementation :: CPythonTopic :: Games/Entertainment :: Board GamesTopic :: Software Development :: Libraries :: Python Modules |
Evidence: stockfish-5.2.0-py3-none-any.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “chess engine python wrapper”
- stockfishWraps the Stockfish chess engine to let Python code query best moves,…
- chessA pure-Python chess library providing move generation, validation,…
- python-chesspython-chess provides move generation, move validation, and board…
Give your agent the search over MCP, or paste the wish link into any chat.
More Python Modules packages
Converts domain names between Unicode and ASCII-compatible encoding (Punycode) according to IDNA 2008 and Unicode Technical Standard 46, with security validation and broader script coverage than the standard library.
Install it if you work with internationalized domain names, need to validate domains, or use HTTP clients that depend on it transitively.
Setuptools is a Python build backend and package management tool that handles building, distributing, and installing Python packages, including support for C/C++ extension modules.
PyYAML parses and emits YAML 1.1 data format, enabling serialization and deserialization of configuration files and Python objects to and from human-readable YAML text.
Pydantic validates Python data structures against type hints, coercing and checking input at runtime to ensure it matches a declared schema.
Provides reusable metadata objects for use with PEP-593 `typing.Annotated` to express common constraints like bounds, collection sizes, and predicates on types.
Install it if you use or build libraries that need to express type constraints in a standardized, inspectable way—or if you want to annotate your own types with…
Provides runtime tools to inspect and introspect Python type annotations, enabling programmatic examination of type hints at execution time.
See also python-chess · chess · zen-engine · finlab · TextArena · azure-ai-evaluation · bfi · magiccube · django-ordered-model · pure-eval