tapolink-proto
An async Python library for TP-Link Tapo (and current Kasa) devices, written from scratch under Apache-2.0 with no GPL code. Release 0.1 covers two things.
- Cloud inventory (
tapolink_proto.cloud): sign in to the TP-Link cloud (MFA supported), refresh tokens, list the account's devices, and read each device's current LAN IP from the IoT API. TLS is pinned to TP-Link's own root certificates. The cloud is used for inventory only; this library never controls a device through it. - TDP identity probe (
tapolink_proto.discovery): a unicast probe on UDP 20002 that returns a device's ID, MAC, model and login scheme. Use it to check that the device at an IP is the one the cloud listed before you send it credentials. Each probe carries a random serial, and only replies that echo it are accepted.
Local device control (AES / KLAP / TPAP) is not in this release.
The Home Assistant helper
tapo_onboard uses this
library.
import aiohttp
from tapolink_proto.cloud import CloudClient, build_cloud_ssl_context
async with aiohttp.ClientSession() as http:
client = CloudClient(
http,
ssl_context=build_cloud_ssl_context(), # blocking; run in an executor
terminal_uuid=my_stable_uuid4, # generate once, keep forever
)
session = await client.login(email, password)
for device in await client.list_devices(session):
details = await client.device_details(session, device)
print(device.alias, device.model, details.ip)
Rate limits. TP-Link locks accounts that call the cloud too often (error
-20004). Keep it to one login, a device list about every 30 minutes, and a details
lookup only when you need a device's address.
Not affiliated with or endorsed by TP-Link.
Metadata
Release files for tapolink-proto 0.1.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| tapolink_proto-0.1.2.tar.gz | 25.7 kB | With provenance | Details for tapolink_proto-0.1.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| tapolink_proto-0.1.2-py3-none-any.whl | Python 3 | none | any | Details for tapolink_proto-0.1.2-py3-none-any.whl |
Total release size: 48.1 kB
Release files / tapolink_proto-0.1.2.tar.gz
| Download URL | tapolink_proto-0.1.2.tar.gz |
|---|---|
| Size | 25.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
42d9c5706372fe94fb34c34786b06e5443e13d32ec96cb1f10efc34d73b767b0
|
|
BLAKE2b-256 checksum How to use checksums |
d6765b9b27dfd68c022f359eb674f1e06448e73600c0c0b80eebdee87850487c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 8, 2026.
Transparency logRelease files / tapolink_proto-0.1.2-py3-none-any.whl
| Download URL | tapolink_proto-0.1.2-py3-none-any.whl |
|---|---|
| Size | 22.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
233f202ebfae9f9c801355ff0b7412c44e4bf5bfa494e185a9242e31ed52257a
|
|
BLAKE2b-256 checksum How to use checksums |
3cc7008c31e14fd4ee7870fa3db497d93c05f33e21927f90bcfcbcdcf64a8177
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 8, 2026.
Transparency logSecurity for tapolink-proto 0.1.2
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.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for tapolink_proto-0.1.2.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 8, 2026.
Transparency logA 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.