Skip to main content

Windsuite User SDK for the Windshape Software Suite.

Project description

WindShape Software Suite SDK

Installation

uv add windsuite_sdk

# Legacy pip method
pip install windsuite_sdk

Basic Example

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()

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

windsuite_sdk-0.4.7.tar.gz (95.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

windsuite_sdk-0.4.7-py3-none-any.whl (18.3 kB view details)

Uploaded Python 3

File details

Details for the file windsuite_sdk-0.4.7.tar.gz.

File metadata

  • Download URL: windsuite_sdk-0.4.7.tar.gz
  • Upload date:
  • Size: 95.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.4 {"installer":{"name":"uv","version":"0.10.4","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Arch Linux","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for windsuite_sdk-0.4.7.tar.gz
Algorithm Hash digest
SHA256 1d488345fcbbefcf2482369094ae6517b2f442a40b613f0fd8281da46eb65453
MD5 c49a991a5dd2597a653540f2690169ab
BLAKE2b-256 cca93929cd3b8eaf85f4f459a1e8fee9ab657829f400d19ceec2fce14762437e

See more details on using hashes here.

File details

Details for the file windsuite_sdk-0.4.7-py3-none-any.whl.

File metadata

  • Download URL: windsuite_sdk-0.4.7-py3-none-any.whl
  • Upload date:
  • Size: 18.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.4 {"installer":{"name":"uv","version":"0.10.4","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Arch Linux","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for windsuite_sdk-0.4.7-py3-none-any.whl
Algorithm Hash digest
SHA256 e24c74197aca432063840f4e4d10610c6257bf8525133a2d1e6a546caaac04b8
MD5 57ffe0cc1a83d6dc9ad8c64610a05bd5
BLAKE2b-256 2c2677fde0f91ab03c886e9f94fa1b5c0b28d72cd32caebd5859b8edb8eab376

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page