/python-poolcop

Primary LanguagePythonApache License 2.0Apache-2.0

Asynchronous Python client for the PoolCopilot API.

About

A python package to interact with a PoolCop device.

Installation

pip install poolcop

Usage

import asyncio
import json
from poolcop import PoolCopilot

API_KEY="xxxxxxxxxxxxxxxxxxxxxxx"

async def main() -> None:
    """Show example on fetching the status from PoolCop."""
    async with PoolCopilot(api_key=API_KEY) as client:
        status = await client.status()
    print(json.dumps(status, indent=2))

if __name__ == "__main__":
    asyncio.run(main())