Metadata-Version: 2.4
Name: bpod-core
Version: 0.1.0a15
Summary: A modern Python interface for Bpod Finite State Machines.
Author: Florian Rau
Author-email: Florian Rau <bimac@users.noreply.github.com>
License-Expression: MIT
License-File: LICENSE
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Science/Research
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
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: Programming Language :: Python :: 3.14
Classifier: Topic :: Scientific/Engineering
Classifier: Typing :: Typed
Requires-Dist: numpy>=1.21.2,<3
Requires-Dist: pydantic>=2.8,<3
Requires-Dist: pydantic-extra-types>=2.2,<3
Requires-Dist: pyserial~=3.5
Requires-Dist: graphviz>=0.19
Requires-Dist: pyzmq>=23
Requires-Dist: zeroconf>=0.129
Requires-Dist: msgspec>=0.18.6
Requires-Dist: packaging>=14
Requires-Dist: pyyaml>=6
Requires-Dist: platformdirs>=2.3,<5
Requires-Dist: filelock>=3.0.6,<4
Requires-Dist: psutil>=5.9
Requires-Dist: polars>=1.32.3,<3
Requires-Dist: xxhash>=3
Requires-Dist: cachetools>=4.2
Requires-Dist: typing-extensions>=4.13
Requires-Dist: tzdata ; sys_platform == 'win32'
Requires-Python: >=3.10
Project-URL: Changelog, https://github.com/int-brain-lab/bpod-core/blob/main/CHANGELOG.md
Project-URL: Documentation, https://int-brain-lab.github.io/bpod-core/
Project-URL: Homepage, https://github.com/int-brain-lab/bpod-core
Project-URL: Issues, https://github.com/int-brain-lab/bpod-core/issues
Project-URL: Repository, https://github.com/int-brain-lab/bpod-core.git
Description-Content-Type: text/markdown

# bpod-core

A modern Python interface for Bpod Finite State Machines.

> [!WARNING]
> bpod-core is under development and not yet ready for production use.

bpod-core is a Python library for running behavioral experiments on Bpod hardware. You
describe the trial logic as a finite state machine; bpod-core validates it, runs it on a
connected Bpod device, and returns every recorded event with precise timestamps as an
analysis-ready data frame.

Bpod Finite State Machines are an open-source platform by
[*Sanworks*](https://sanworks.io/) for controlling behavioral experiments: a
microcontroller-based finite state machine that runs the trial logic in real time and
talks to sensors, valves, and other peripherals with deterministic millisecond-scale
timing. Running the state machine on dedicated microcontroller hardware, rather than a
general-purpose computer, keeps time-critical trial execution isolated from
operating-system scheduling jitter. This makes Bpod particularly well-suited to
closed-loop experiments, where state transitions must be triggered by sensor readings
within a tight, predictable latency.

bpod-core grew out of the need for a modern, well-tested way to work with Bpod devices
from Python, and is designed to fit naturally into everyday research workflows. It is
maintained by the software development team at the
[*International Brain Laboratory*](https://internationalbrainlab.org/).

### Goals

* **Interface to Bpod Devices:** Provides an interface for interacting with Bpod
  devices.
* **State Machine Management:** Offers capabilities to define, validate, and run state
  machines.
* **Standalone or Library Use:** Can function independently or be integrated as a
  library within other projects.
* **Performance-Oriented:** Designed to be lean and fast.
* **Quality Assurance:** Typed, tested, and documented.

### Non-Goals

* **No GUI:** Does not include a graphical user interface.
* **Limited High-Level Functionality:** Does not provide features such as data
  management, configuration, or calibration.
* **No Specific Module Support:** Does not implement support for specific Bpod modules.

## Installation

bpod-core is available on [PyPI](https://pypi.org/project/bpod-core/):

```console
pip install bpod-core
```

See the [installation guide](https://int-brain-lab.github.io/bpod-core/installation/)
for requirements and recommended setup.

## Feedback and Contributing

Report bugs and request features on the
[issue tracker](https://github.com/int-brain-lab/bpod-core/issues). To contribute, see
the [contributing guide](https://int-brain-lab.github.io/bpod-core/contributing/).

## Links

* [bpod-core documentation](https://int-brain-lab.github.io/bpod-core) – the official documentation of bpod-core.
* [Bpod Wiki](https://sanworks.github.io/Bpod_Wiki) – maintained by [
  *Sanworks*](https://sanworks.io/).
* [PyBpod](https://pybpod.readthedocs.io) – another Python project for Bpod devices maintained by the [*Champalimaud Foundation*](http://research.fchampalimaud.org/).

---
[![CI](https://github.com/int-brain-lab/bpod-core/actions/workflows/main.yaml/badge.svg)](https://github.com/int-brain-lab/bpod-core/actions/workflows/main.yaml)
[![Checked with mypy](https://www.mypy-lang.org/static/mypy_badge.svg)](https://mypy-lang.org/)
[![Coverage Status](https://coveralls.io/repos/github/int-brain-lab/bpod-core/badge.svg?branch=main)](https://coveralls.io/github/int-brain-lab/bpod-core?branch=main)
[![License](https://img.shields.io/github/license/int-brain-lab/bpod-core)](https://github.com/int-brain-lab/bpod-core/blob/main/LICENSE)
[![GitHub Release](https://img.shields.io/github/v/release/int-brain-lab/bpod-core?include_prereleases)](https://github.com/int-brain-lab/bpod-core/releases/latest)
[![PyPI](https://img.shields.io/pypi/v/bpod-core)](https://pypi.org/project/bpod-core/)
[![DOI](https://img.shields.io/badge/DOI-10.5281%2Fzenodo.21497456-blue.svg)](https://doi.org/10.5281/zenodo.21497456)
