Metadata-Version: 2.3
Name: pymxbi
Version: 0.3.5
Summary: Python interfaces and drivers for MXBI
Author: HuYang
Author-email: HuYang <huyangcommit@gmail.com>
Requires-Dist: gpiozero>=2.0.1
Requires-Dist: loguru>=0.7.3
Requires-Dist: numpy>=2.4.1
Requires-Dist: prompt-toolkit>=3.0.52
Requires-Dist: pyaudio>=0.2.14
Requires-Dist: pydantic>=2.12.5
Requires-Dist: pyglet>=2.1.13
Requires-Dist: pymotego>=0.1.5
Requires-Dist: pyserial>=3.5
Requires-Dist: rich>=14.2.0
Requires-Dist: soundfile>=0.13.1
Requires-Dist: typer>=0.21.1
Requires-Python: >=3.14
Description-Content-Type: text/markdown

# pymxbi

Python interfaces and drivers for mxbi

English | [中文](README.zh.md)

## Install

```bash
pip install pymxbi
```

Or with `uv`:

```bash
uv add pymxbi
```

## Public API

### Detectors

- `pymxbi.detector.detector.Detector`: base class + event registration
- `pymxbi.detector.detector.DetectorEvent` / `DetectorState` / `DetectionResult`
- `pymxbi.detector.beam_break_rfid_detector.BeamBreakRFIDDetector`: beam-break + RFID combined detector

### Rewarders

- `pymxbi.rewarder.rewarder.Rewarder`: reward backend protocol (`open`, `give_reward*`, `stop_reward`, `close`)
- `pymxbi.rewarder.pump_rewarder.PumpRewarder`: time-based reward delivery via a pump
- `pymxbi.rewarder.mock_rewarder.MockRewarder`: logging-only mock implementation

### Peripherals

- Pumps: `pymxbi.peripheral.pumps.pump.Pump` / `Direction`, `pymxbi.peripheral.pumps.RPI_gpio_pump.RPIGpioPump`
- Through-beam sensors: `pymxbi.peripheral.through_beam_sensor.through_beam_sensor.ThroughBeamSensor`, `pymxbi.peripheral.through_beam_sensor.RPI_IR_break_beam_sensor.RPIIRBreakBeamSensor`
- RFID reader: `pymxbi.peripheral.rfid.dorset_lid665v42.DorsetLID665v42` (`open`, `begin`, `read`, `close`, `errno`)

### Utilities

- Audio volume: `pymxbi.peripheral.amixer.amixer.set_master_volume`, `set_digital_volume` (calls `amixer`)

## Notes

- Typed package (`py.typed`), requires Python `>=3.14`.
