Skip to main content

Kippy API

An asynchronous Python client for Kippy pet trackers, extracted from the Kippy Home Assistant integration. Python 3.13 or newer is required. aiohttp is the only runtime dependency.

Use

import asyncio
import os
from zoneinfo import ZoneInfo

from aiohttp import ClientSession
from kippy_api import KippyApi


async def main():
    async with ClientSession() as session:
        api = await KippyApi.async_create(session)
        await api.login(os.environ["KIPPY_EMAIL"], os.environ["KIPPY_PASSWORD"])
        pets = await api.get_pet_kippy_list()
        # Pass the reporting timezone explicitly; the machine timezone is ignored.
        if pets:
            await api.get_activity_categories(
                pets[0]["petID"],
                "2026-09-01",
                "2026-09-02",
                2,
                1,
                timezone=ZoneInfo("Europe/London"),
            )


asyncio.run(main())

You own the session and close it. The client never closes or replaces it. Existing endpoint names and dictionary results are preserved: get_pet_kippy_list, kippymap_action, modify_kippy_settings, and get_activity_categories. Use do_sms=False for cached map reads; device commands can change your tracker.

Catch KippyAuthError for missing/invalid credentials or exhausted authentication refresh, KippyConnectionError for transport failures, and KippyResponseError for rejected or malformed responses. All inherit KippyError and expose optional status and return_code metadata. Requests time out after 30 seconds and only confirmed authentication failures receive one retry after login. Network timeouts never retry commands. Concurrent token expiry shares a login refresh.

The client preserves known successful HTTP 401 bodies and the vendor's existing TLS cipher compatibility setting, with certificate and hostname checks enabled. It logs response status only, never account or location payloads. API result metadata may be vendor supplied; avoid logging whole response objects.

The package has no Home Assistant imports, polling, entities, translation loading, or credential file handling. See the protocol reference for the reverse-engineered API.

Development

uv sync --frozen --group dev
uv run ruff check .
uv run ruff format --check .
uv run mypy
uv run pytest
uv run python -m build
uv run twine check dist/*

Tests use synthetic responses and a local HTTP server; they do not require credentials or contact Kippy. CI also installs the built wheel into an environment without Home Assistant. uv.lock pins development tooling; the library dependency range remains compatible with the consuming application's aiohttp version.

For development with the adjacent Home Assistant integration, install this folder editable in its environment.

Original source copyright (c) 2025 Thomas Wright, MIT license.

Metadata

Release files for kippy-api 1.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for kippy-api 1.0.0
File Size Uploaded Provenance
kippy_api-1.0.0.tar.gz 18.0 kB With provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for kippy-api 1.0.0
File Interpreter ABI Platform
kippy_api-1.0.0-py3-none-any.whl Python 3 none any Details

Total release size: 31.8 kB

Release files / kippy_api-1.0.0.tar.gz

Download URL kippy_api-1.0.0.tar.gz
Size 18.0 kB
Tags Source
SHA-256 checksum
How to use checksums
d37d6812f0fa468db16973bd8c414ec37f00a9146934b8b09b032ac22b3e55c8
BLAKE2b-256 checksum
How to use checksums
42bf590c681019cb9071a5c33d0d4995b1466083436013ae244becbb2f9e3c0a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 21, 2026.

Transparency log

Release files / kippy_api-1.0.0-py3-none-any.whl

Download URL kippy_api-1.0.0-py3-none-any.whl
Size 13.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
285833182ca1d74069761d44ab136d6771b017e5033c4cd1bc85c4bf1a5a6f6d
BLAKE2b-256 checksum
How to use checksums
90fb1d8d5bf51b2d5c4fa0ca28e4d94e8a96d78eb1e99d068d9f121216e5e091
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 21, 2026.

Transparency log

Security for kippy-api 1.0.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for kippy_api-1.0.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 21, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page