Metadata-Version: 2.4
Name: cv-ws-streamer
Version: 0.1.0
Summary: High-performance bridge connecting Python OpenCV to React using Binary WebSockets
Project-URL: Homepage, https://github.com/example/cv-ws-streamer
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Requires-Python: >=3.8
Description-Content-Type: text/markdown
Requires-Dist: fastapi
Requires-Dist: uvicorn[standard]
Requires-Dist: opencv-python
Requires-Dist: numpy
Requires-Dist: websockets

# cv-ws-streamer

A high-performance Python library for streaming frames (OpenCV/NumPy) to a React client via Binary WebSockets.

## Features
- 🚀 **Binary Protocol**: Low overhead MJPEG streaming.
- **Two-way Communication**: Handle clicks and events from the frontend.
- **FastAPI Integration**: Easy to drop into existing FastAPI apps.

## Installation

```bash
pip install cv-ws-streamer
```

## Usage

```python
from fastapi import FastAPI, WebSocket
from cv_ws_streamer.core import Streamer
import cv2

app = FastAPI()
streamer = Streamer(jpeg_quality=70)

@app.websocket("/ws")
async def websocket_endpoint(websocket: WebSocket):
    await streamer.connect(websocket)

# In your video loop:
# await streamer.send_frame(frame)
```
