Metadata-Version: 2.4
Name: viso-sdk-python
Version: 1.1.19
Summary: VisoSDK: A Python SDK for use in Viso containers
Home-page: https://gitlab.com/TopKamera/03_edge/Base/viso-sdk-python-public.git
Author: support@viso.ai
Author-email: support@viso.ai
License: LGPLv3
Classifier: Development Status :: 5 - Production/Stable
Classifier: Environment :: Console
Classifier: Intended Audience :: System Administrators
Classifier: License :: OSI Approved :: GNU Lesser General Public License v3 (LGPLv3)
Classifier: Natural Language :: English
Classifier: Operating System :: POSIX
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.6
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Requires-Python: >=3.6.0
Description-Content-Type: text/markdown
License-File: COPYING
License-File: AUTHORS
Requires-Dist: requests
Requires-Dist: requests-toolbelt
Requires-Dist: setuptools
Requires-Dist: paho-mqtt
Requires-Dist: redis
Requires-Dist: opencv-contrib-python-headless~=4.10.0
Requires-Dist: cython~=3.0.2
Requires-Dist: numpy~=1.26.2
Requires-Dist: six~=1.16.0
Requires-Dist: traceback2~=1.4.0
Requires-Dist: shapely~=2.0.7
Requires-Dist: python-magic
Requires-Dist: orjson>=3.9.0
Dynamic: author
Dynamic: author-email
Dynamic: classifier
Dynamic: description
Dynamic: description-content-type
Dynamic: home-page
Dynamic: license
Dynamic: license-file
Dynamic: requires-dist
Dynamic: requires-python
Dynamic: summary

# viso-sdk-python

**viso-sdk-python** is a Python SDK providing shared utilities for [viso.ai](https://viso.ai) edge containers. It covers logging, Redis/MQTT communication, model fetching, ROI handling, detection structures, and more.

Licensed under [LGPLv3](https://www.gnu.org/licenses/lgpl-3.0.html).

---

## Requirements

- **Python** >= 3.6
- **System library**: `libmagic1` (required by the `model` module)

```shell
apt-get install libmagic1
```

---

## Installation

```shell
pip install viso-sdk-python
```

---

## Modules

| Module | Description |
|---|---|
| `viso_sdk.constants` | Shared constants and environment-driven configuration |
| `viso_sdk.model` | Model fetching, extraction, and type detection |
| `viso_sdk.logging` | Centralised logger factory |
| `viso_sdk.redis` | Redis stream wrapper and cleanup utilities |
| `viso_sdk.mqtt` | MQTT client wrapper |
| `viso_sdk.roi` | Region-of-interest helpers |
| `viso_sdk.detection` | Detection result structures |
| `viso_sdk.edge` | Edge device utilities |
| `viso_sdk.status` | Container status reporting |
| `viso_sdk.nodered` | Node-RED integration helpers |

---

## Usage Examples

### Redis Communication

```python
from viso_sdk.redis import RedisWrapper, VisoData

# Initialize Redis wrapper
redis = RedisWrapper(host="localhost", port=6379)

# Write data
redis.write_data("my_key", {"status": "active"})

# Read data
data = redis.read_viso_data("my_key")
```

### MQTT Messaging

```python
from viso_sdk.mqtt import MqttWrapper

# Initialize MQTT client
mqtt = MqttWrapper()

# Publish message
mqtt.publish(topic="device/status", message='{"state": "online"}')
```

### Logging

```python
from viso_sdk.logging import get_logger

logger = get_logger("MyModule")
logger.info("Application started")
logger.error("An error occurred")
```

---

## Contributing

Contributions are welcome! See [CONTRIBUTING.md](CONTRIBUTING.md) for development setup, testing guidelines, and CI pipeline information.

---

## License

Licensed under [LGPLv3](https://www.gnu.org/licenses/lgpl-3.0.html).
