$npx skillfedfor your agent

python-kasa

Python API for TP-Link Kasa and Tapo devices

With conditionsPyPI NetworkingReleased Feb 2025194.6K downloads / moGPL-3.0-or-laterPure Python

Decision gist · record as of 2026-08-14

pure-Python wheel — python_kasa-0.10.2-py3-none-any.whl
v0.10.2 · released 2025-02-12 · Python <4.0,>=3.11 · 5 runtime deps: aiohttp, asyncclick, cryptography, mashumaro, tzdata

Yes, if you own TP-Link Kasa or Tapo devices and need to control them from Python or the command line. The library is actively maintained, has low install friction, and covers a broad range of device types. The GPL-3.0-or-later license is permissive for personal and open-source use but requires attention if you plan to distribute proprietary software. No known security vulnerabilities.AI-flagged interpretation of the facts on this page — verify before relying

Before you install

  • Requires Python 3.11 or later; devices must be on the same network or reachable by IP address.
  • Low friction: pure Python wheel with 5 runtime dependencies (aiohttp, asyncclick, cryptography, mashumaro, tzdata).
  • Active maintenance with recent commits; last release 548 days ago but repository shows ongoing development.

License · maintenance · safety

GPL-3.0-or-later (copyleft) — GPL-3.0-or-later (copyleft): you must share modifications under the same license if you distribute derived work. Acceptable for internal use and open-source projects; check your distribution model before embedding.

last release 2025-02-12 (548 days) · last repo commit 2026-07-18 · 1,722 stars

0 known vulnerabilities (OSV.dev, 2026-08-14) · 194,598 downloads/mo, #9,829 on PyPI

Verify before relying

pip install python-kasa

import asyncio
from kasa import Discover

async def main():
    dev = await Discover.discover_single("192.0.2.123")
    await dev.turn_on()
    await dev.update()

asyncio.run(main())
  • Whether authentication (username/password) is required for all device types or only some models.
  • Performance and latency characteristics when controlling many devices simultaneously.
  • Support status for devices not explicitly listed in the documentation.
Same gist for agents: .md · .json

What it is and what it does

python-kasa is a community-maintained Python library and CLI tool for discovering and controlling TP-Link Kasa and Tapo smart home devices. It provides both a high-level async API for programmatic control and a command-line interface for direct device management. The library handles device discovery via broadcast, authentication, and feature-based control (turning devices on/off, adjusting brightness, color temperature, and other device-specific settings).

The package is built on async I/O (aiohttp, asyncclick) and supports modern Python versions (3.11+). It works with a wide range of TP-Link hardware including plugs, power strips, wall switches, bulbs, light strips, hubs, and hub-connected devices. The library is not affiliated with TP-Link and relies on community contributions for device support and testing.

Use it for

  • Automate smart plugs and switches in a home network via Python scripts or scheduled tasks.
  • Build a dashboard or mobile app that discovers and controls multiple TP-Link devices.
  • Integrate TP-Link devices into a broader home automation system (e.g., Home Assistant).
  • Query device state (power, brightness, color) and log telemetry for monitoring.
  • Provision and configure TP-Link devices programmatically before deployment.

Worth the install?

AI-flagged interpretation of the facts on this page. Verify before relying on it.

With conditions

Yes, if you own TP-Link Kasa or Tapo devices and need to control them from Python or the command line.

The library is actively maintained, has low install friction, and covers a broad range of device types. The GPL-3.0-or-later license is permissive for personal and open-source use but requires attention if you plan to distribute proprietary software. No known security vulnerabilities.

Install

python-kasa on PyPI

Before you install

Low friction: pure Python wheel with 5 runtime dependencies (aiohttp, asyncclick, cryptography, mashumaro, tzdata). Active maintenance with recent commits; last release 548 days ago but repository shows ongoing development.

Requires Python 3.11 or later; devices must be on the same network or reachable by IP address.

License in practice

GPL-3.0-or-later (copyleft): you must share modifications under the same license if you distribute derived work. Acceptable for internal use and open-source projects; check your distribution model before embedding.

Quickstart

pip install python-kasa

import asyncio
from kasa import Discover

async def main():
    dev = await Discover.discover_single("192.0.2.123")
    await dev.turn_on()
    await dev.update()

asyncio.run(main())

Verify before relying

  • Whether authentication (username/password) is required for all device types or only some models.
  • Performance and latency characteristics when controlling many devices simultaneously.
  • Support status for devices not explicitly listed in the documentation.

Package facts

LicenseGPL-3.0-or-later copyleft
Python supportSupports the current Python release <4.0,>=3.11
Install frictionLow. Pure-Python wheel
Runtime dependencies
5 packages
aiohttpasyncclickcryptographymashumarotzdata
MaintenanceActively maintained 548 days since the last release
Last repo commit
First released
Downloads194,598 / month, #9,829 on PyPI 30-day window, as of 2026-08-14
Known vulnerabilitiesNone known OSV.dev, checked 2026-08-14
Classifiers
License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)Operating System :: OS IndependentProgramming Language :: Python :: 3Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13

Evidence: python_kasa-0.10.2-py3-none-any.whl

Tags

Capabilities
tp-link smart home controlkasa device automationtapo smart plug pythonsmart home device apinetwork-connected device controlhome automation librarysmart bulb and switch control
Topics
smart-homedevice-controlasync-io

Let your AI agent find packages like this

Example. Real query, live index.

You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.

wish › “tp-link smart home control”

  • python-kasaControl TP-Link Kasa and Tapo smart home devices (plugs, switches,…
  • plugp100A Python library for controlling and discovering TP-Link Tapo smart…
  • pytapoPyTapo is a Python library that communicates with Tapo IP cameras…

Give your agent the search over MCP, or paste the wish link into any chat.

More Networking packages

h11 With conditions
PyPI · WWW/HTTP · released Apr 2025

h11 is a pure-Python HTTP/1.1 protocol implementation that handles parsing and serializing HTTP messages without any built-in I/O, letting you integrate it with any network layer you choose.

MITpure Python · 3.8+aging
894.9Mdownloads / mo
psutil Worth it
PyPI · Libraries · released Jan 2026

psutil retrieves real-time information about running processes and system resources (CPU, memory, disks, network, sensors) across multiple operating systems, enabling system monitoring, process profiling, and resource management.

permissive licensecompiled wheel · 3.6+
387.6Mdownloads / mo
pyOpenSSL With conditions
PyPI · Python Modules · released Aug 2026

pyOpenSSL wraps OpenSSL's SSL/TLS functionality for Python, providing high-level connection objects and certificate handling through a Python-friendly interface around OpenSSL's cryptographic operations.

Apache-2.0pure Python · 3.9+
294.2Mdownloads / mo
uvloop With conditions
PyPI · Networking · released Oct 2025

uvloop is a drop-in replacement for Python's built-in asyncio event loop, implemented in Cython and using libuv, that accelerates async I/O operations.

Apache-2.0compiled wheel · 3.8.1+
257.9Mdownloads / mo
execnet With conditions
PyPI · Libraries · released Nov 2025

execnet lets you spawn and communicate with Python interpreters across local processes, remote hosts, and different platforms, using a simple API for task distribution and inter-process messaging.

However, the aging maintenance status (275 days since last release) means you should verify it meets your concurrency and performance needs before committing to a…

MITpure Python · 3.8+aging
172.1Mdownloads / mo
pyzmq Worth it
PyPI · Networking · released Sep 2025

PyZMQ provides Python bindings for ZeroMQ (ØMQ), a lightweight messaging library that enables fast, asynchronous communication between distributed processes and applications.

BSD-3-Clausecompiled wheel · 3.8+
109.5Mdownloads / mo

See also plugp100 · tplink-omada-client · broadlink · pytapo · govee-api-laggat · pywizlight · meross-iot · dlipower · flux-led · roombapy