Skip to main content

A package for interacting with the concord4ws server.

Project description

concord4ws-py

Python library for interfacing with Concord4WS https://github.com/JoeyEamigh/concord4ws. This library depends on the Concord4WS server.

Installation

pip install concord4ws

Usage

import asyncio
from concord4ws import Concord4WSClient


async def main():
    client = Concord4WSClient("127.0.0.01", 8080)

    if await client.test_connect():
        print("Connected")
    else:
        print("Not Connected")

    zoneCallback = lambda: print(client._state.zones)
    partitionCallback = lambda: print(client._state.partitions)

    await client.connect()

    print("Ready!")

    for zone in client._state.zones:
        client.register_callback(zone, zoneCallback)

    for partition in client._state.partitions:
        client.register_callback(partition, partitionCallback)

    await asyncio.futures.Future()


asyncio.run(main())

Development Setup

python -m venv .venv
source .venv/bin/activate
pip install --upgrade pip
pip install -r requirements.txt

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

concord4ws-0.2.1.tar.gz (6.4 kB view hashes)

Uploaded Source

Built Distribution

concord4ws-0.2.1-py3-none-any.whl (7.3 kB view hashes)

Uploaded Python 3

Supported by

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