# python-kasa/python-kasa

🏠🤖 Python API for TP-Link smarthome products

Repository: https://github.com/python-kasa/python-kasa
Canonical: https://ross.abutalabs.com/products/python-kasa
Homepage: https://python-kasa.readthedocs.io/en/stable/
Language: Python
License: NOASSERTION
License Family: other
Topics: tplink, smarthome, asyncio, kasa, tapo, python, hacktoberfest
Last push: 2026-07-18T14:02:57+00:00

## Health v2 (maintenance only)
Score: 76/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 93, release rhythm 40, longevity 100
- inputs: {"age_days": 2485, "days_push": 46, "days_rel": 567, "gap_med": 15, "n_releases_24m": 12}
- flags: no_license
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1737, forks 301 (observed 2026-08-28T04:05:29.836267+00:00)

## What it is
A Python library and accompanying CLI for controlling TP-Link Kasa and Tapo smart home devices such as plugs, switches, power strips, and bulbs. It supports device discovery over the local network, authentication, and state control via an asyncio-based API.

## Use cases
- control TP-Link Kasa plugs from Python
- discover Tapo smart bulbs on my network
- turn smart switches on and off from the command line
- read energy and device state from Kasa power strips
- integrate TP-Link smarthome devices into home automation scripts
- provision a new Tapo device with wifi credentials

## When to choose
- you want programmatic or CLI control of TP-Link Kasa/Tapo devices
- you are building home automation integrations in Python
- you need local-network device discovery without the vendor cloud app

## When to avoid
- you need official vendor support or a guarantee of compatibility with the newest firmware
- you control smart home devices from other brands
- you need a graphical mobile app rather than a library or CLI

## Facets
- artifact type: library
- maturity: active
- function: sdk, cli, workflow-automation
- domain: iot, developer-tools
- platform: python, windows, cli
- tags: tplink, kasa, tapo, smarthome, asyncio, device-control, automation, linux, macos

## Member repositories
- python-kasa/python-kasa (main) score 76

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:05:29.836267+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T03:30:38.981923+00:00, confidence not recorded.
  - readme: https://github.com/python-kasa/python-kasa (fetched 2026-08-28T04:05:29.836267+00:00, sha e3218510a4c7)
  - registry_pypi: https://pypi.org/pypi/python-kasa/json (fetched 2026-08-29T11:08:20.494547+00:00, sha 07928e192b5c)
- Data as of 2026-08-30T08:39:29.467469+00:00.
