Skip to main content

Asynchronous Python client for the PoolCopilot API

Project description

Asynchronous Python client for the PoolCopilot API.

About

A python package to interact with a PoolCop device through the PoolCopilot API.

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

API Features

The PoolCopilot API provides access to various features of your PoolCop device:

Status Information

  • Water and air temperature
  • pH and ORP (Oxidation-Reduction Potential) values
  • Water level status
  • Valve position
  • Pump status and speed
  • Equipment status (auxiliaries, etc.)
  • Filter settings and timers
  • Forced filtration status and remaining time

Commands

  • Toggle pump on/off
  • Set pump speed (for multi-speed pumps)
  • Toggle auxiliary outputs
  • Set valve position
  • Clear alarms
  • Set forced filtration mode (24h, 48h, or 72h)

History

  • Alarm history (with pagination)
  • Command history (with pagination)

Quota Management

  • token_limit — remaining API calls in the current window
  • token_expire — epoch timestamp when the current quota window resets

Options

  • lang parameter — sets the X-PoolCopilot-Lang header for localised responses

Development

This project uses Poetry for dependency management.

git clone https://github.com/sstriker/python-poolcop.git
cd python-poolcop
poetry install --with dev
poetry run pytest

Releasing to PyPI

The repository uses trusted publishing via GitHub Actions. To release:

  1. Bump the version in pyproject.toml
  2. Merge to main
  3. Create a GitHub Release (this creates a tag and triggers the publish workflow)
  4. The workflow runs tests, builds with Poetry, and publishes to PyPI automatically

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

poolcop-0.7.0.tar.gz (10.1 kB view details)

Uploaded Source

Built Distribution

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

poolcop-0.7.0-py3-none-any.whl (11.2 kB view details)

Uploaded Python 3

File details

Details for the file poolcop-0.7.0.tar.gz.

File metadata

  • Download URL: poolcop-0.7.0.tar.gz
  • Upload date:
  • Size: 10.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for poolcop-0.7.0.tar.gz
Algorithm Hash digest
SHA256 ed654d4afcb3fb6af8830f8496dc819b6ac1b5ee47dba4c517110b0ba7964ab4
MD5 a4cba9ee1ee9a36bf718bcad693186b5
BLAKE2b-256 ce12afccc8fd3d8ce059347e76daaa2f2e33a648d1bf98ae7cc87227b213afc2

See more details on using hashes here.

Provenance

The following attestation bundles were made for poolcop-0.7.0.tar.gz:

Publisher: release.yml on sstriker/python-poolcop

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file poolcop-0.7.0-py3-none-any.whl.

File metadata

  • Download URL: poolcop-0.7.0-py3-none-any.whl
  • Upload date:
  • Size: 11.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for poolcop-0.7.0-py3-none-any.whl
Algorithm Hash digest
SHA256 4facc716606aa7fcf4c106bf608193f547dddc7c57e38ed8b1234f0e89a0fbb2
MD5 2447faa07cc5d5dbf04068891458cb42
BLAKE2b-256 1eac446a98e3d317785aff8c3f3c4657ddd37cd9612f56f83cc141704972b4de

See more details on using hashes here.

Provenance

The following attestation bundles were made for poolcop-0.7.0-py3-none-any.whl:

Publisher: release.yml on sstriker/python-poolcop

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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