aiounifi
Python library for communicating with UniFi Network Controller API
What it is and what it does
aiounifi is an asynchronous Python client for the UniFi Network Controller API. It wraps HTTP communication with the controller using aiohttp, allowing non-blocking queries and updates to UniFi network devices and settings. The library is designed for integration into home automation systems and other applications that need to monitor or control UniFi networks without blocking the event loop.
The package depends on aiohttp for async HTTP transport, orjson for fast JSON parsing, pyotp for OTP-based authentication support, and segno for QR code generation. It targets Python 3.13 and later, reflecting a focus on modern async patterns. The library is actively maintained and classified as production-stable, making it suitable for production deployments in home automation contexts.
Use it for:
- Integrate UniFi network monitoring into home automation platforms.
- Build custom dashboards or management tools that query UniFi controller state asynchronously.
- Automate network device management tasks via Python scripts without blocking.
- Monitor UniFi network metrics and device status in real-time.
- Develop applications that interact with UniFi networks for device discovery or control.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Asynchronous Python library for communicating with UniFi Network Controller API over the network.
Yes. The package is actively maintained, has low install friction, carries a permissive MIT license, and has no known vulnerabilities. It is well-suited for anyone building Python applications that need to communicate with UniFi controllers. The requirement for Python 3.13.0 or later is a constraint to verify against your environment.
Install
aiounifi on PyPI
pip
pip install aiounifiuv
uv add aiounifipoetry
poetry add aiounifiInstalling aiounifi
Before you install
Low install friction with a pure-Python wheel distribution. Active maintenance with a recent release 39 days ago and ongoing commits; the project is not archived and has modest community engagement at 89 stars.
License in practice
MIT license is permissive, allowing commercial and private use with minimal restrictions—you may use, modify, and distribute this package freely provided you retain the license notice.
Quickstart
pip install aiounifi
import aiounifi
# Requires aiohttp, orjson, pyotp, segno as runtime dependencies
await aiounifi.Controller(host, username, password).login()
Requires Python 3.13.0 or later; aiohttp, orjson, pyotp, and segno must be installed.
Verify before relying
- Whether the library supports all current UniFi Controller versions or has known compatibility gaps.
- Whether aiohttp, orjson, pyotp, and segno are all required at runtime or if some are optional.
- Performance characteristics and typical response times for common operations.
Package facts
| License | MIT (permissive) |
| Python support | supports the current Python release (>=3.13.0) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 4 — aiohttp, orjson, pyotp, segno |
| Maintenance | actively maintained — 39 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 115,666/month — #12,239 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: aiounifi-92-py3-none-any.whl
Keywords: unifi, homeassistant
Tags
More Home Automation packages
Represents and manipulates IPv4, IPv6, MAC…
permissive · top 5,000 on PyPI
homeassistantHome Assistant is an open-source home…
permissive · top 5,000 on PyPI
python-statemachineDefines finite state machines and statecharts…
permissive · top 5,000 on PyPI
btsocketA Python library for controlling BlueZ…
permissive · top 15,000 on PyPI
aiohomematicAn async Python library for controlling and…
permissive · top 15,000 on PyPI
hass-web-proxy-libProvides base classes and utilities for Home…
permissive · top 15,000 on PyPI
aiohueAsynchronous Python library for controlling…
permissive · top 15,000 on PyPI
aioautomowerAsynchronous Python client library for…
permissive · top 15,000 on PyPI
uiprotectProvides an async Python API and CLI for…
permissive · top 15,000 on PyPI
py-unifi-accessAsync Python client for UniFi Access local API…
permissive · top 15,000 on PyPI
aiohasupervisorAsynchronous Python client library for…
permissive · top 15,000 on PyPI
unifi-discoveryDiscovers Unifi devices on a network using…
permissive · top 15,000 on PyPI
zwave-js-server-pythonPython client library for communicating with…
permissive · top 15,000 on PyPI
python-homewizard-energyAsyncio client library for communicating with…
permissive · top 15,000 on PyPI
python-openevse-httpA Python library for asynchronous communication…
permissive · top 15,000 on PyPI
pyisyPyISY is a Python library for asynchronous…
permissive · top 15,000 on PyPI