Skip to main content

tplink-deco-api

CI PyPI

Python SDK for controlling TP-Link Deco mesh Wi-Fi routers via the internal HTTP API.

Installation

pip install tplink-deco-api

Usage

from tplink_deco_api import DecoClient

with DecoClient("192.168.68.1", "admin", "your-password") as deco:
    for client in deco.get_client_list():
        print(client.name, client.ip, client.connection_type)

Available methods

Session

Method Returns
login() LoginResult
logout() None
is_authenticated() bool

Typed queries

Method Returns
get_device_list() list[Device]
get_device_mode() DeviceMode
get_wlan_config() WlanConfig
get_performance() Performance
get_client_list(deco_mac?) list[ClientDevice]
get_client_totals(deco_mac?) NetworkTotals
get_internet_status() InternetStatus
get_wan_info(device_mac?) WanInfo
get_dsl_status(device_mac?) DslStatus
get_wireless_power(device_mac?) WirelessPower
get_time_settings(device_mac?) TimeSettings
get_log_types() list[LogType]

Raw access

request(path, form, data) and request_list(path, form, data) send an authenticated, encrypted request to any endpoint and return the decrypted result (as an object or a list respectively). Use them for the endpoints that have no typed wrapper yet — the full catalogue is documented in docs/endpoints/.

Models

Every method returns typed dataclasses — no generic dictionaries.

client.mac              # "AA:BB:CC:DD:EE:FF"
client.name             # "MacBook Pro"
client.ip               # "192.168.68.10"
client.connection_type  # "band6"
client.online           # True

device.device_model     # "BE65"
device.software_ver     # "1.2.10 Build 20251229"

wlan.band2_4.host.ssid      # "My Network"
wlan.band2_4.guest.password # "guest-password"

perf.cpu_usage  # 0.03
perf.mem_usage  # 0.42

Requirements

  • Python 3.11+
  • TP-Link Deco router reachable on the local network

License

MIT

Download files

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

Source Distribution

tplink_deco_api-1.2.2.tar.gz (133.8 kB view details)

Uploaded Source

Built Distribution

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

tplink_deco_api-1.2.2-py3-none-any.whl (27.5 kB view details)

Uploaded Python 3

Release history Release notifications | RSS feed

This release

1.2.2 This release

2 files

1.2.1

2 files

1.2.0

2 files

1.1.2

2 files

1.1.1

2 files

1.1.0

2 files

1.0.1

2 files

1.0.0

2 files

0.1.0

2 files

Supported by

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