# postlund/pyatv

A client library for Apple TV and AirPlay devices

Repository: https://github.com/postlund/pyatv
Canonical: https://ross.abutalabs.com/products/pyatv
Homepage: https://pyatv.dev
Language: Python
License: MIT
License Family: permissive
Topics: home-automation, apple-tv, python3, asyncio, pypi, hacktoberfest, airplay, raop
Last push: 2026-08-14T04:04:07+00:00

## Health v2 (maintenance only)
Score: 86/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 97, release rhythm 65, longevity 100
- inputs: {"age_days": 3500, "days_push": 19, "days_rel": 75, "gap_med": 171.0, "n_releases_24m": 5}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1168, forks 141 (observed 2026-08-28T04:03:50.942773+00:00)

## What it is
pyatv is an asyncio-based Python client library for interacting with Apple TV and AirPlay devices, supporting remote control, metadata retrieval, app launching, and audio streaming. It also ships with CLI tools like atvremote and atvscript for device control and scripting without writing code.

## Use cases
- control an Apple TV from a Python script
- stream audio to AirPlay speakers like HomePod
- get currently playing metadata from an Apple TV
- integrate Apple TV control into Home Assistant
- discover Apple TV devices on the local network
- launch apps on an Apple TV programmatically
- script Apple TV commands with JSON output

## When to choose
- you need programmatic control of Apple TVs or AirPlay devices from Python
- you are building home automation integrations with Apple media devices
- you want CLI tools to control or script Apple TV interactions
- you need to support all Apple TV generations including tvOS 15+

## When to avoid
- you need to control Chromecast, Roku, or non-Apple streaming devices
- you need full video streaming to AirPlay, which has only basic support
- you want a ready-made GUI remote app rather than a library
- your project is not Python-based and you cannot call CLI tools

## Facets
- artifact type: library
- maturity: active
- function: sdk, cli, audio-processing, developer-tools
- domain: developer-tools, media, self-hosted
- platform: python, windows, cross-platform, cli
- tags: apple-tv, airplay, raop, asyncio, home-automation, media-streaming, zeroconf, remote-control, automation, macos, linux

## Member repositories
- postlund/pyatv (main) score 86

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:03:50.942773+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-30T06:28:48.698857+00:00, confidence not recorded.
  - readme: https://github.com/postlund/pyatv (fetched 2026-08-28T04:03:50.942773+00:00, sha 8b81328cd6e4)
  - homepage: https://pyatv.dev (fetched 2026-08-29T12:35:06.492852+00:00, sha 4a8f44680862)
  - site_page: https://pyatv.dev/documentation/atvscript (fetched 2026-08-29T12:35:06.503828+00:00, sha 13140da8a42d)
  - site_page: https://pyatv.dev/documentation (fetched 2026-08-29T12:35:06.495645+00:00, sha 490960158a9a)
  - site_page: https://pyatv.dev/documentation/supported_features (fetched 2026-08-29T12:35:06.497770+00:00, sha ab3d02ac1944)
  - site_page: https://pyatv.dev/documentation/atvremote (fetched 2026-08-29T12:35:06.499743+00:00, sha a3504d02ce7b)
  - site_page: https://pyatv.dev/documentation/atvproxy (fetched 2026-08-29T12:35:06.501970+00:00, sha 7808a75c7c3f)
  - site_page: https://pyatv.dev/documentation/atvlog (fetched 2026-08-29T12:35:06.505393+00:00, sha 96a7215d9567)
  - site_page: https://pyatv.dev/documentation/getting-started (fetched 2026-08-29T12:35:06.506791+00:00, sha 373ed7351ef2)
  - site_page: https://pyatv.dev/documentation/tutorial (fetched 2026-08-29T12:35:06.508392+00:00, sha b77a765a2165)
- Data as of 2026-08-30T08:39:29.467469+00:00.
