Metadata-Version: 2.4
Name: ibuddy
Version: 1.0.0
Summary: Control the MSN i-Buddy USB figure from Python
License-Expression: MIT
Project-URL: Homepage, https://github.com/DJche/ibuddy
Project-URL: Repository, https://github.com/DJche/ibuddy
Project-URL: Issues, https://github.com/DJche/ibuddy/issues
Keywords: ibuddy,i-buddy,usb,hid,hardware
Classifier: Development Status :: 5 - Production/Stable
Classifier: Intended Audience :: Developers
Classifier: Operating System :: Microsoft :: Windows
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 :: System :: Hardware
Requires-Python: >=3.9
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: pywinusb>=0.4.2
Dynamic: license-file

# ibuddy

Control your MSN i-Buddy USB figure from Python.

## Install

```bash
pip install ibuddy
```

## Quick Start

```python
from ibuddy import IBuddyDevice

with IBuddyDevice() as buddy:
    buddy.demo()
    buddy.head_color("red")
    buddy.flap(5)
    buddy.heartbeat(3)
```

## Available Colors

`red`, `green`, `blue`, `cyan`, `magenta`, `yellow`, `white`

## What Can It Do?

| Method | Description |
|--------|-------------|
| `head_color(name)` | Set head LED to a named color |
| `heart(on)` | Turn the heart LED on/off |
| `flap(times)` | Flap the wings N times |
| `wiggle(times)` | Swivel torso left/right N times |
| `heartbeat(times)` | Blink the heart LED N times |
| `rainbow(times)` | Cycle through all 7 colors |
| `celebrate()` | Party mode: wiggle + flap + heartbeat + rainbow |
| `demo()` | Full demo of all features |
| `reset()` | Turn everything off |

All action methods accept `times` and `delay`/`duration` parameters for fine control.

## Context Manager

Always use `with` to ensure the device is properly reset when done:

```python
with IBuddyDevice() as buddy:
    buddy.head_color("blue", duration=1.0)
    buddy.flap(3)
# Automatically resets and closes
```

## Platform

**Windows only** - The i-Buddy uses Windows HID APIs for communication.

## License

MIT
