semvec/pypi-packages huggingface dataset:
anymetrica 0.1.0
Python plugin library for Anymetrica platform

# Anymetica plugin library

## Installation

Install as a PyPi package:
```bash
pip install anymetrica
```

## Usage

```python
from anymetrica import Handler, Plugin
import asyncio

h = Handler()

p = Plugin('my_awesome_plugin', h, conn_string='ws://localhost:4344')

asyncio.run(p.start())
```

## Developing callbacks

You can create custom callbacks to handle incoming and outcoming messages and implement your business logic.

```python
from anymetrica import Event, Bounds, Handler

def my_callback(frame:bytes) -> Event:
    """
    You can perform some image handling in there.
    """
    return Event(
        name='my.event.name',
        bounds=Bounds(x=10, y=10, w=50, h=50),
        probabilty=0.99,
    )

h = Handler(event_callback=my_callback)
```