Skip to main content

Unifi Python API

A python implementation of the Unifi controller API

Instalation

$ pip install unifi-python-api

Progress

For now, only the guest manager calls have been implemented (because that's my current use for this API). I'm working on the tests then i'll move on to the statistics calls.

Example usage

from unifi_api import UnifiClient

unifi_controller_url = 'https://example.com:8443'

# Create the client then login
client = UnifiClient(unifi_controller_url)
client.login(username="example", password="example")

# Or both at once
client = UnifiClient(unifi_controller_url, username="example", password="example")

# Then use freely, if the session expires another login will be made automatically
# Example: authorize client for an hour
client.authorize_guest("AA-BB-CC-DD-EE-FF", 60)

TODO:

  • make tests with pytest
  • statistics calls

Credits

Translated from the Unifi API client in php:

Metadata

Release files for unifi-python-api 0.2.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for unifi-python-api 0.2.3
File Size Uploaded Provenance Actions
unifi_python_api-0.2.3.tar.gz 13.2 kB Without provenance Details for unifi_python_api-0.2.3.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for unifi-python-api 0.2.3
File Interpreter ABI Platform Actions
unifi_python_api-0.2.3-py3-none-any.whl Python 3 none any Details for unifi_python_api-0.2.3-py3-none-any.whl

Total release size: 25.4 kB

Release files / unifi_python_api-0.2.3.tar.gz

Download URL unifi_python_api-0.2.3.tar.gz
Size 13.2 kB
Tags Source
SHA-256 checksum
How to use checksums
984069b7b4d0b9466c3827f6acad22b350e78b5bf474cf2abace94cb55e59770
BLAKE2b-256 checksum
How to use checksums
1d5727b7e842d37f1461c7affaf2ec22dd6f483fcec5d6a18f6df21d8e238739
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.12.4

Release files / unifi_python_api-0.2.3-py3-none-any.whl

Download URL unifi_python_api-0.2.3-py3-none-any.whl
Size 12.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c4fb33d3c315a9edfb385bc8eabb18e8f59a8e005172ce05e5e06361cc09c9a2
BLAKE2b-256 checksum
How to use checksums
08f8d4b0033499c300eac33a83dd6dea6a2d05da0afd897280e0490e78e52d4c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.12.4

Security for unifi-python-api 0.2.3

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page