Skip to main content

Python library for interacting with UniFi Site Manager API

Project description

UniFi Site Manager API Client

Python interface for interacting with UniFi’s Site Manager Integration API. Tested on selfhosted local instance only.

📦 Usage

from unifi_sm_api.api import SiteManagerAPI

api = SiteManagerAPI(
    api_key="fakeApiKey1234567890",
    base_url="https://192.168.100.1/proxy/network/integration/",
    version="v1",
    verify_ssl=False
)

sites = api.get_sites()
devices = api.get_unifi_devices(site_id="site-id")
clients = api.get_clients(site_id="site-id")

📘 Endpoints Covered

  • /sites — list available sites
  • /sites/{site_id}/devices — list UniFi devices for a site
  • /sites/{site_id}/clients — list connected clients

🔧 Requirements

  • Python 3.8+
  • requests
  • pytest (for running tests)
  • Local .env file with API credentials

Testing

🌍 Environment Setup

Create a .env file in the project root with the following:

API_KEY=fakeApiKey1234567890
BASE_URL=https://192.168.100.1/proxy/network/integration/
VERSION=v1
VERIFY_SSL=False

🧪 Running Tests

Make sure PYTHONPATH includes the project root, then run:

PYTHONPATH=.. pytest -s tests/test_api.py

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_sm_api-0.1.0.tar.gz (14.6 kB view details)

Uploaded Source

Built Distribution

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

unifi_sm_api-0.1.0-py3-none-any.whl (14.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: unifi_sm_api-0.1.0.tar.gz
  • Upload date:
  • Size: 14.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for unifi_sm_api-0.1.0.tar.gz
Algorithm Hash digest
SHA256 4498370d34cf6af1486a44567d5055959857a33616330b530f6b808d8b038a26
MD5 b458742c3d2a78fe33c76ca71a8e6749
BLAKE2b-256 3b1b55e83efd5f54acdd82c35a7cbb45828c7625680bce62b081ef999661410d

See more details on using hashes here.

Provenance

The following attestation bundles were made for unifi_sm_api-0.1.0.tar.gz:

Publisher: python-publish.yml on jokob-sk/unifi-sm-api

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

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

File metadata

  • Download URL: unifi_sm_api-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 14.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for unifi_sm_api-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 4a79e5995e9c5e1f323b228f0c55c2e4f422f438976e54968a150c118af32c26
MD5 063c38514e688bf89712ab7ca5e31473
BLAKE2b-256 87dbc77a2125ea6694c87d6d8ad126d92a6ce4645361b769cce9c3522c10d9ec

See more details on using hashes here.

Provenance

The following attestation bundles were made for unifi_sm_api-0.1.0-py3-none-any.whl:

Publisher: python-publish.yml on jokob-sk/unifi-sm-api

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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