Metadata-Version: 2.4
Name: windsuite-sdk
Version: 0.4.8
Summary: Windsuite User SDK for the Windshape Software Suite.
Author-email: Jonas Stirnemann <jonas.stirnemann@windshape.com>
Requires-Python: >=3.11
Requires-Dist: loguru>=0.7.3
Requires-Dist: numpy>=2.3.2
Requires-Dist: python-socketio[asyncio-client]>=5.13.0
Requires-Dist: requests>=2.32.4
Description-Content-Type: text/markdown

# WindShape Software Suite SDK

## Installation

```bash
uv add windsuite_sdk

# Legacy pip method
pip install windsuite_sdk
```


## Basic Example

```python
import os
import threading

from dotenv import load_dotenv
from windsuite_sdk import WindsuiteSDK

load_dotenv()

SERVER_IP_ADDRESS = os.getenv("SERVER_IP_ADDRESS", default="localhost")

stop_event = threading.Event()


def main() -> None:
    base_url = f"http://{SERVER_IP_ADDRESS}"

    print(f"Connecting to WindSuite server at {base_url}")

    sdk = WindsuiteSDK(base_url=base_url)
    sdk.start_communication()

    main_loop_hz = 25

    try:
        sdk.set_psu(state=True)
        stop_event.wait(timeout=2)

        sdk.fan_controller.set_intensity(percent=10).apply()

        while not stop_event.wait(timeout=(1.0 / main_loop_hz)):
            # ! DO WHATEVER
            pass

    except KeyboardInterrupt:
        print("\nShutting down...")
        stop_event.set()
    finally:
        sdk.fan_controller.set_intensity(0).apply()
        sdk.cleanup()
        print("SDK stopped")


if __name__ == "__main__":
    main()
```
