How jezza34000/py-petkit-api works
PetKit API Client is an asynchronous Python client for managing PetKit accounts and devices. A developer creates PetKitClient, retrieves account/device data, then reads device entities or sends commands; media and Bluetooth operations extend that workflow. Device-specific models represent feeders, litter boxes, fountains, and purifiers, while command definitions and shared containers support API operations. The README documents these capabilities; sampled source confirms client requests, command mapping, media processing, and BLE relay behavior, but not every client call path.
Main entry points: client.py PetKit client · media.py Media manager · bluetooth.py Bluetooth manager · containers.py Account entities
Components 15
Client and API
- PetKit client
pypetkitapi/client.py - HTTP transport
pypetkitapi/client.py
Device Data
- Account entities
pypetkitapi/containers.py - Feeder models
pypetkitapi/feeder_container.py - Litter models
pypetkitapi/litter_container.py - Fountain models
pypetkitapi/water_fountain_container.py - Purifier models
pypetkitapi/purifier_container.py - Schedules
pypetkitapi/schedule_container.py
Device Operations
- Command mapping
pypetkitapi/command.py - Bluetooth manager
pypetkitapi/bluetooth.py
Media
- Media manager
pypetkitapi/media.py - Downloaded media
Other components
- Developer
- PetKit API
- PetKit BLE relay
Connections 16
- Developer → PetKit client: creates and calls
- PetKit client → HTTP transport: makes requests
- HTTP transport → PetKit API: sends API requests
- PetKit client → Account entities: builds account data
- PetKit client → Feeder models: parses device data
- PetKit client → Litter models: parses device data
- PetKit client → Fountain models: parses device data
- PetKit client → Purifier models: parses device data
- PetKit client → Schedules: uses schedule data
- PetKit client → Command mapping: maps commands
- PetKit client → Bluetooth manager: exposes BLE control
- Bluetooth manager → HTTP transport: requests relay
- HTTP transport → PetKit BLE relay: dispatches BLE requests
- Developer → Media manager: requests media
- Media manager → PetKit client: requests media data
- Media manager → Downloaded media: saves files