pyhiveapi
A Python library to interface with the Hive API
What it is and what it does
pyhive-integration is a Python client library for the Hive smart home platform, providing both async and sync APIs to discover, monitor, and control Hive devices (thermostats, hot water, lights, plugs, sensors, and hubs). It handles AWS Cognito SRP authentication with optional SMS two-factor authentication, automatic token refresh, and a polling-based device cache. The library is designed primarily for Home Assistant integration but works standalone.
The package ships two entry points: one async and one sync, both built from the same source. It supports a wide range of Hive device types with granular control and includes a file-based offline mode for testing without live credentials. Eight runtime dependencies (boto3, requests, aiohttp, loguru, and others) handle authentication, HTTP communication, and logging.
Use it for:
- Integrate Hive heating and hot water control into Home Assistant automations and dashboards.
- Build standalone Python scripts to monitor and control Hive devices on a schedule.
- Develop a custom smart home dashboard that queries Hive device state and sends commands.
- Test Hive device logic and integrations offline using the file-based fixture mode without real credentials.
- Automate lighting control (brightness, color, on/off) based on external events or time-based rules.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
A Python library for controlling Hive smart home devices (heating, hot water, lights, plugs, sensors) via the Hive API, with both async and sync interfaces.
Yes. The package is actively maintained, has no known vulnerabilities, uses a permissive MIT license, and provides a dual async/sync API for Hive smart home control. Low install friction and stable status make it a safe choice for Home Assistant users or standalone Hive automation. Verify the Python version requirement before installing.
Install
pyhiveapi on PyPI
pip
pip install pyhiveapiuv
uv add pyhiveapipoetry
poetry add pyhiveapiInstalling pyhiveapi
Before you install
Low install friction with a pure-Python wheel. Actively maintained with a recent commit (2026-08-07) and stable status. Eight runtime dependencies are all well-established libraries (boto3, requests, aiohttp, loguru, etc.), so dependency resolution should be straightforward.
License in practice
MIT license (permissive) means you can use, modify, and distribute this library freely in commercial and private projects with minimal restrictions — just include the license notice.
Quickstart
from pyhiveapi import Auth, Hive
auth = Auth(username="user@example.com", password="yourpassword")
tokens = auth.login()
hive = Hive(username="user@example.com", password="yourpassword")
hive.startSession({"tokens": tokens})
for device in hive.session.data.devices.values():
print(device)
Hive account credentials (username/password) are required; guest accounts are not supported. Verify your Python version matches the actual minimum requirement.
Verify before relying
- Classifiers declare support for Python 3.6–3.9, but description states 'Requires Python 3.10+'; which is the actual minimum?
- Whether the package works standalone outside Home Assistant as claimed, or if Home Assistant integration is a primary use case with limitations elsewhere.
- Performance characteristics and polling frequency tuning options for large device counts or high-frequency state updates.
- Exact capabilities and control options for each device type (heating, hot water, lights, plugs, sensors, hub/sense).
Package facts
| License | MIT (permissive) |
| Python support | supports the current Python release (>=3.6) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 8 — pre-commit, boto3, botocore, requests, aiohttp, pyquery, unasync, loguru |
| Maintenance | actively maintained — 977 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 115,217/month — #12,264 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: pyhiveapi-0.5.16-py2.py3-none-any.whl
Keywords: Hive, API, Library
Tags
More Internet packages
Botocore provides low-level, data-driven access…
permissive · top 100 on PyPI
aiobotocoreProvides an async client for AWS services using…
permissive · top 100 on PyPI
pydanticPydantic validates Python data structures…
permissive · top 100 on PyPI
filelockProvides a platform-independent file locking…
permissive · top 100 on PyPI
fastapiFastAPI is a Python web framework for building…
permissive · top 100 on PyPI
googleapis-common-protosProvides common Protocol Buffer message…
permissive · top 100 on PyPI
aiohueAsynchronous Python library for controlling…
permissive · top 15,000 on PyPI
iaqualinkAsynchronous Python library for monitoring and…
permissive · top 15,000 on PyPI
PyHivePyHive provides DB-API and SQLAlchemy…
permissive · top 5,000 on PyPI
pyswitchbeeA Python library for controlling SwitchBee…
permissive · top 15,000 on PyPI
PyViCarePyViCare provides Python access to Viessmann…
permissive · top 15,000 on PyPI
boschshcpyPython client library for the Bosch Smart Home…
permissive · top 15,000 on PyPI
myPyllantA Python library for interacting with the…
permissive · top 15,000 on PyPI
pure-transportProvides a Thrift transport for PyHive…
permissive · top 15,000 on PyPI
homematicipA Python wrapper for the HomematicIP REST API…
copyleft · top 15,000 on PyPI
python-hpiloAutomates HP iLO (Integrated Lights Out) server…
unclear · top 15,000 on PyPI