Metadata-Version: 2.4
Name: python-reckless
Version: 0.1.6
Summary: A lightweight Python wrapper for the Reckless UCI chess engine
Project-URL: Homepage, https://github.com/DaveP80/python-reckless
Project-URL: Repository, https://github.com/DaveP80/python-reckless
Project-URL: Issues, https://github.com/DaveP80/python-reckless/issues
Author-email: David Paquette <davidpaq1@gmail.com>
License-Expression: MIT
License-File: LICENSE
Keywords: chess,chess-engine,reckless,uci
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Games/Entertainment :: Board Games
Requires-Python: >=3.9
Provides-Extra: dev
Requires-Dist: build; extra == 'dev'
Requires-Dist: pytest>=7.0; extra == 'dev'
Requires-Dist: twine; extra == 'dev'
Description-Content-Type: text/markdown

# python-reckless

A lightweight, dependency-free Python wrapper for the
[Reckless](https://github.com/codedeliveryservice/Reckless) UCI chess engine.

`python-reckless` does **not** bundle the engine. Reckless is a standalone
compiled executable; this package launches it as a subprocess and speaks the
UCI protocol to it. You supply the binary.

## Installing the engine

Download a prebuilt binary for your platform from the
[Reckless releases page](https://github.com/codedeliveryservice/Reckless/releases),
then make it discoverable in one of these ways:

- Put it on your `PATH` as `reckless`, **or**
- set the `RECKLESS_PATH` environment variable to its full path, **or**
- pass the path directly: `Reckless(path="/path/to/reckless")`.

## Installing this package

```bash
pip install python-reckless
```

The import name is `reckless` (the distribution name is `python-reckless`).

## Usage

```python
from reckless import Reckless

with Reckless() as engine:
    engine.new_game()
    engine.set_position(moves=["e2e4", "e7e5"])
    best = engine.best_move(depth=12)
    print("Reckless suggests:", best)
```

You can also search by time instead of depth:

```python
move = engine.best_move(movetime=1000)  # think for 1 second
```
## Development

Make changes on a feature branch and put up to date `engine.py` files and other helper files in the `src` directory.

## Note

For a fully featured UCI client (analysis info, evaluations, multipv, async),
consider the mature [`python-chess`](https://pypi.org/project/chess/) library,
whose `chess.engine.SimpleEngine.popen_uci()` works with Reckless out of the
box. This package is intentionally tiny and focused.

## License

MIT
