Metadata-Version: 2.4
Name: esp32-stream
Version: 0.1.0
Summary: ESP32 serial stream protocol parser and frame source adapter
Author: ESP32 Host Tooling
Requires-Python: >=3.10
Description-Content-Type: text/markdown
Requires-Dist: pyserial>=3.5
Requires-Dist: numpy>=1.26
Provides-Extra: opencv
Requires-Dist: opencv-python>=4.10; extra == "opencv"
Provides-Extra: dev
Requires-Dist: pytest>=8.0; extra == "dev"
Requires-Dist: pytest-cov>=5.0; extra == "dev"

# esp32-stream

Reusable Python package for ESP32 serial stream protocol parsing and camera frame assembly.

This package is the source of truth for host-side stream handling used by calibration and other consumer projects.

## Install

```bash
pip install esp32-stream
```

With OpenCV decode support:

```bash
pip install "esp32-stream[opencv]"
```

## Development Install

From this folder:

```bash
pip install -e ".[dev,opencv]"
pytest
```

## Public API

- `esp32_stream.protocol`: packet constants, parser, command builders
- `esp32_stream.board_profiles`: board defaults and aliases
- `esp32_stream.esp32_frame_source`: `Esp32FrameSource`, `Esp32VideoCaptureAdapter`

## Consumer Pinning (recommended)

Pin exact versions in downstream projects:

```txt
esp32-stream==0.1.0
```

For local integration testing before release:

```bash
pip install -e /absolute/path/to/esp32/python/esp32_stream
```

Do not use editable installs for production or CI release branches.

## Upgrade Workflow

1. Update package in this repo on a feature branch.
2. Run package tests (`pytest`).
3. Run the consumer smoke test in each downstream project.
4. Bump version and tag release.
5. Update pinned version in each consumer project when ready.

## Release

```bash
python -m pip install --upgrade build twine
python -m build
python -m twine check dist/*
```

Tag example:

```bash
git tag v0.1.0
git push origin v0.1.0
```
