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 windowtoken_expire— epoch timestamp when the current quota window resets
Options
langparameter — sets theX-PoolCopilot-Langheader 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:
- Bump the version in
pyproject.toml - Merge to
main - Create a GitHub Release (this creates a tag and triggers the publish workflow)
- The workflow runs tests, builds with Poetry, and publishes to PyPI automatically
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ed654d4afcb3fb6af8830f8496dc819b6ac1b5ee47dba4c517110b0ba7964ab4
|
|
| MD5 |
a4cba9ee1ee9a36bf718bcad693186b5
|
|
| BLAKE2b-256 |
ce12afccc8fd3d8ce059347e76daaa2f2e33a648d1bf98ae7cc87227b213afc2
|
Provenance
The following attestation bundles were made for poolcop-0.7.0.tar.gz:
Publisher:
release.yml on sstriker/python-poolcop
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
poolcop-0.7.0.tar.gz -
Subject digest:
ed654d4afcb3fb6af8830f8496dc819b6ac1b5ee47dba4c517110b0ba7964ab4 - Sigstore transparency entry: 1104769446
- Sigstore integration time:
-
Permalink:
sstriker/python-poolcop@32ada6b2ad6f1937fb96a8b938ffe58da98589f4 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/sstriker
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@32ada6b2ad6f1937fb96a8b938ffe58da98589f4 -
Trigger Event:
workflow_dispatch
-
Statement type:
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4facc716606aa7fcf4c106bf608193f547dddc7c57e38ed8b1234f0e89a0fbb2
|
|
| MD5 |
2447faa07cc5d5dbf04068891458cb42
|
|
| BLAKE2b-256 |
1eac446a98e3d317785aff8c3f3c4657ddd37cd9612f56f83cc141704972b4de
|
Provenance
The following attestation bundles were made for poolcop-0.7.0-py3-none-any.whl:
Publisher:
release.yml on sstriker/python-poolcop
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
poolcop-0.7.0-py3-none-any.whl -
Subject digest:
4facc716606aa7fcf4c106bf608193f547dddc7c57e38ed8b1234f0e89a0fbb2 - Sigstore transparency entry: 1104769543
- Sigstore integration time:
-
Permalink:
sstriker/python-poolcop@32ada6b2ad6f1937fb96a8b938ffe58da98589f4 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/sstriker
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@32ada6b2ad6f1937fb96a8b938ffe58da98589f4 -
Trigger Event:
workflow_dispatch
-
Statement type: