py-unifi-access
Async Python client for the UniFi Access local API with WebSocket event support
Decision gist · record as of 2026-08-14
Yes, if you need to control UniFi Access hardware from Python. The package is actively maintained, has low install friction, uses permissive MIT licensing, and provides well-typed async APIs. It is beta-status software with no known vulnerabilities. Install it if you are building Home Assistant integrations or custom automation around UniFi Access; skip it if you do not have UniFi Access hardware or need synchronous APIs.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires Python 3.12 or later; UniFi Access hardware and local API credentials required.
- Low friction installation with a pure-Python wheel.
- Actively maintained with a release 27 days ago and recent commits.
License · maintenance · safety
MIT (permissive) — MIT license permits commercial and private use with minimal restrictions; you may use, modify, and distribute the package freely provided you include the license notice.
last release 2026-07-18 (27 days) · last repo commit 2026-07-23 · 2 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 76,954 downloads/mo, #14,571 on PyPI
Alternatives
Verify before relying
pip install py-unifi-access
import aiohttp
from py_unifi_access import UnifiAccessApiClient
async with aiohttp.ClientSession() as session:
client = UnifiAccessApiClient("192.168.1.1", "api-token", session)
await client.authenticate()
doors = await client.get_doors()- Whether WebSocket event parsing covers all UniFi Access event types beyond the 13 documented types.
- Performance characteristics under high-frequency event streams or with many concurrent door operations.
- Compatibility with UniFi Access hardware versions and firmware releases.
What it is and what it does
py-unifi-access is an async Python client library for controlling UniFi Access hardware via its local API. It uses aiohttp for REST calls and provides WebSocket support for real-time device events, with automatic reconnection and exponential backoff. All API responses and WebSocket events are typed using Pydantic v2 models, making it suitable for Home Assistant integrations and other async applications that need structured, type-safe access to UniFi hardware.
The package is designed for stateless operation, fitting Home Assistant's DataUpdateCoordinator pattern. It includes a CLI tool (via the `cli` extra) for debugging WebSocket events by capturing raw and parsed message streams to JSON files, useful when troubleshooting integration issues or reporting bugs.
Use it for
- Build Home Assistant integrations that monitor and control UniFi Access doors and locks in real time.
- Create automation scripts that unlock doors or check access status based on external triggers.
- Debug WebSocket event parsing by capturing raw event streams to identify schema mismatches.
- Monitor emergency status and device updates across multiple UniFi Access units asynchronously.
- Integrate UniFi Access control into custom smart-home or building-management applications.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes, if you need to control UniFi Access hardware from Python.
The package is actively maintained, has low install friction, uses permissive MIT licensing, and provides well-typed async APIs. It is beta-status software with no known vulnerabilities. Install it if you are building Home Assistant integrations or custom automation around UniFi Access; skip it if you do not have UniFi Access hardware or need synchronous APIs.
Install
py-unifi-access on PyPI
Before you install
Low friction installation with a pure-Python wheel. Actively maintained with a release 27 days ago and recent commits. Requires Python 3.12 or later.
Requires Python 3.12 or later; UniFi Access hardware and local API credentials required.
License in practice
MIT license permits commercial and private use with minimal restrictions; you may use, modify, and distribute the package freely provided you include the license notice.
Quickstart
pip install py-unifi-access
import aiohttp
from py_unifi_access import UnifiAccessApiClient
async with aiohttp.ClientSession() as session:
client = UnifiAccessApiClient("192.168.1.1", "api-token", session)
await client.authenticate()
doors = await client.get_doors()
Verify before relying
- Whether WebSocket event parsing covers all UniFi Access event types beyond the 13 documented types.
- Performance characteristics under high-frequency event streams or with many concurrent door operations.
- Compatibility with UniFi Access hardware versions and firmware releases.
Package facts
| License | MIT permissive |
| Python support | Supports the current Python release >=3.12 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | 2 packagesaiohttppydantic |
| Maintenance | Actively maintained 27 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 76,954 / month, #14,571 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Development Status :: 4 - BetaIntended Audience :: DevelopersLicense :: OSI Approved :: MIT LicenseProgramming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Typing :: Typed |
Evidence: py_unifi_access-1.6.1-py3-none-any.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “unifi access api client”
- py-unifi-accessAsync Python client for UniFi Access local API with WebSocket event…
- aiounifiAsynchronous Python library for communicating with UniFi Network…
- uiprotectProvides an async Python API and CLI for interacting with UniFi…
Give your agent the search over MCP, or paste the wish link into any chat.
More Networking packages
h11 is a pure-Python HTTP/1.1 protocol implementation that handles parsing and serializing HTTP messages without any built-in I/O, letting you integrate it with any network layer you choose.
psutil retrieves real-time information about running processes and system resources (CPU, memory, disks, network, sensors) across multiple operating systems, enabling system monitoring, process profiling, and resource management.
pyOpenSSL wraps OpenSSL's SSL/TLS functionality for Python, providing high-level connection objects and certificate handling through a Python-friendly interface around OpenSSL's cryptographic operations.
uvloop is a drop-in replacement for Python's built-in asyncio event loop, implemented in Cython and using libuv, that accelerates async I/O operations.
execnet lets you spawn and communicate with Python interpreters across local processes, remote hosts, and different platforms, using a simple API for task distribution and inter-process messaging.
However, the aging maintenance status (275 days since last release) means you should verify it meets your concurrency and performance needs before committing to a…
PyZMQ provides Python bindings for ZeroMQ (ØMQ), a lightweight messaging library that enables fast, asynchronous communication between distributed processes and applications.
See also uiprotect · aiounifi · pyisy · subarulink · gotailwind · openccu-loom-client · seam · aioambient · unifi-discovery · fastapi-socketio