Skip to main content

Python client for the Unifi Access local API with websocket event handling

Project description

py-unifi-access

A reusable Python client for the UniFi Access local API with support for websocket event handlers. This repository hosts the shared library used by the Home Assistant custom component in hass-unifi-access.

Features

  • REST and websocket support for UniFi Access
  • Configurable websocket handler registration
  • Door model helpers and normalization utilities

Installation

pip install py-unifi-access

Usage

from unifi_access_api import UnifiAccessApiClient

client = UnifiAccessApiClient("https://unifi-access.local")
client.register_websocket_handler("access.logs.add", lambda payload: print(payload))
client.fetch_and_set_doors()
client.start_websocket()

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

py_unifi_access-0.1.0.tar.gz (6.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

py_unifi_access-0.1.0-py3-none-any.whl (8.4 kB view details)

Uploaded Python 3

File details

Details for the file py_unifi_access-0.1.0.tar.gz.

File metadata

  • Download URL: py_unifi_access-0.1.0.tar.gz
  • Upload date:
  • Size: 6.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.6

File hashes

Hashes for py_unifi_access-0.1.0.tar.gz
Algorithm Hash digest
SHA256 261df3fc0ddd127c35a9fecb7c54d26de7b9beeb04b1ea746a2447db5b4fa990
MD5 1339b387ec6c3394e766eb2145523978
BLAKE2b-256 11cbaca392af487564f86f9094f04613121506ab5677ae40eca9bc7c10497092

See more details on using hashes here.

File details

Details for the file py_unifi_access-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for py_unifi_access-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 cc02a75b1cc0b1e0d7b8495e9e350f587ad22c23c7f15c1e66d18f9dd6e2c9e7
MD5 3d4eec1911485c8f3b1f3615ae1d13b5
BLAKE2b-256 6c4a9a77ed335670786870bcd9e45d8a5382294e463841c226a350ec46fbe07e

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page