Skip to main content

Python API client for Ubiquiti UniFi Controller

Project description

UniFi WLC API

Python API client for Ubiquiti UniFi Controller.

安装

pip install unifi_wlc_api

使用方法

from unifi_wlc_api import UnifiApi

# 创建UniFi API客户端实例
unifi = UnifiApi(
    controller_url="https://your-controller-url:8443",
    username="your-username",
    password="your-password",
    site="default",  # 可选,默认为"default"
    ssl_verify=False  # 生产环境应设置为True
)

# 登录
if unifi.login():
    try:
        # 获取设备列表
        devices = unifi.list_devices()
        print(f"Found {len(devices)} devices")

        # 获取客户端列表
        clients = unifi.list_clients()
        print(f"Found {len(clients)} online clients")

        # 获取站点统计信息
        site_stats = unifi.stat_sites()
        print("Site statistics retrieved")

    finally:
        # 注销
        unifi.logout()
else:
    print("Login failed")

主要功能

  • 客户端设备管理:查询、阻止、解除阻止、重新连接等
  • 设备管理:查询、重启、配置等
  • 站点管理:查询、创建、删除、重命名等
  • 统计数据:获取站点和用户的统计数据
  • 网络配置:查询、创建、更新、删除等
  • WLAN配置:查询、创建等
  • 标签管理:查询、创建、更新、删除等
  • 事件和警报管理:查询、归档等
  • 固件管理:查询、升级等
  • 系统日志:查询等

许可证

MIT

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

Uploaded Source

Built Distribution

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

unifi_wlc_api-0.1.0-py3-none-any.whl (17.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: unifi_wlc_api-0.1.0.tar.gz
  • Upload date:
  • Size: 17.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.9.13

File hashes

Hashes for unifi_wlc_api-0.1.0.tar.gz
Algorithm Hash digest
SHA256 cca4d9e36344120695692094ab425ee21787492d0124508b96d6c7acda869837
MD5 5042879499da27f97854a6187393db5e
BLAKE2b-256 18b9fca5102232d216568917973964cf96d6084b02c44350167a6e5bf8dc1158

See more details on using hashes here.

File details

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

File metadata

  • Download URL: unifi_wlc_api-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 17.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.9.13

File hashes

Hashes for unifi_wlc_api-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 3fbfcc321f205ae18853b058939d99fff4882152c9f90feadd2ffd0c7f744af6
MD5 62f58bc14be2a6398c7b30c9a41ea198
BLAKE2b-256 e282c4aa0bf13f20a0612c63115916378b43087597b51c0238843ea55902c150

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