Skip to main content

A small example package

Project description

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:

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

unifi_python_api-0.2.3.tar.gz (13.2 kB view details)

Uploaded Source

Built Distribution

unifi_python_api-0.2.3-py3-none-any.whl (12.2 kB view details)

Uploaded Python 3

File details

Details for the file unifi_python_api-0.2.3.tar.gz.

File metadata

  • Download URL: unifi_python_api-0.2.3.tar.gz
  • Upload date:
  • Size: 13.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.4

File hashes

Hashes for unifi_python_api-0.2.3.tar.gz
Algorithm Hash digest
SHA256 984069b7b4d0b9466c3827f6acad22b350e78b5bf474cf2abace94cb55e59770
MD5 2729bfa9b611dd2385e717399ad557e9
BLAKE2b-256 1d5727b7e842d37f1461c7affaf2ec22dd6f483fcec5d6a18f6df21d8e238739

See more details on using hashes here.

File details

Details for the file unifi_python_api-0.2.3-py3-none-any.whl.

File metadata

File hashes

Hashes for unifi_python_api-0.2.3-py3-none-any.whl
Algorithm Hash digest
SHA256 c4fb33d3c315a9edfb385bc8eabb18e8f59a8e005172ce05e5e06361cc09c9a2
MD5 a3a9292edd14f68b4a696b96118fc483
BLAKE2b-256 08f8d4b0033499c300eac33a83dd6dea6a2d05da0afd897280e0490e78e52d4c

See more details on using hashes here.

Supported by

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