Skip to main content

A client library for Apple TV and AirPlay devices

Project description

A client library for Apple TV and AirPlay devices

Tests pyatv Actions codecov Code style: black PyPi Package Gitpod Ready-to-Code Downloads PyPI pyversions License: MIT

This is an asyncio python library for interacting with Apple TV and AirPlay devices. It mainly targets Apple TVs (all generations, including tvOS 15 and later), but also supports audio streaming via AirPlay to receivers like the HomePod, AirPort Express and third-party speakers. It can act as remote control to the Music app/iTunes in macOS.

All the documentation you need is available at

What can it do?

Some examples include:

  • Remote control commands
  • Metadata retrieval with push updates
  • Stream files via AirPlay
  • List and launch installed apps
  • List and switch user accounts
  • Add, remove or set audio output devices (e.g. HomePods)
  • Keyboard support

...and lots more! A complete list is available here.

Great, but how do I use it?

All documentation (especially for developers) are available at It is however possible to install with pip and try things out with atvremote:

$ pip install pyatv
$ atvremote scan
       Name: Office
   Model/SW: HomePodMini tvOS 14.7
        MAC: AA:BB:CC:DD:EE:FF
 Deep Sleep: False
 - Protocol: AirPlay, Port: 7000, Credentials: None
 - Protocol: Companion, Port: 49152, Credentials: None
 - Protocol: RAOP, Port: 7000, Credentials: None, Password: None

Or run in a container (x86_64, aarch64, armv7):

docker run -it --rm --network=host atvremote scan

The master tag points to latest commit on the master branch and can be changed to a specific version, e.g. v0.9.0.

I need to change something?

Want to help out with pyatv? Press the button below to get a fully prepared development environment and get started right away!

Open in Gitpod

Shortcuts to the good stuff

To save you some time, here are some shortcuts:

Project details

Release history Release notifications | RSS feed

Download files

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

Source Distribution

pyatv-0.14.0.tar.gz (1.7 MB view hashes)

Uploaded source

Built Distribution

pyatv-0.14.0-py3-none-any.whl (449.9 kB view hashes)

Uploaded py3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page