skillfed

aiounifi

Python library for communicating with UniFi Network Controller API

aiounifi v92 115.7K downloads/30d#12,239 on PyPI89
Permissive license MIT Active released

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 aiounifi

uv

uv add aiounifi

poetry

poetry add aiounifi

Installing 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

Development Status :: 5 - Production/StableIntended Audience :: DevelopersLicense :: OSI Approved :: MIT LicenseOperating System :: OS IndependentProgramming Language :: Python :: 3.13Topic :: Home Automation

Tags

unifi controller api clientasync unifi network communicationhomeassistant unifi integrationunifi device managementunifi controller python libraryasynchronous network controllerunifi api async
home-automationasync-httpnetwork-management

More Home Automation packages