pya

pyatv

A client library for Apple TV and AirPlay devices

Showing:

Popularity

Downloads/wk

0

GitHub Stars

383

Maintenance

Last Commit

4d ago

Contributors

25

Package

Dependencies

9

License

MIT

Categories

Readme

A client library for Apple TV and AirPlay devices

Tests codecov Code style: black PyPi Package Language grade: Python 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), but also support 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 pyatv.dev.

What can it do?

Some examples include:

  • Remote control commands
  • Metadata retrieval with push updates
  • Stream files via AirPlay
  • List and launch installed apps

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

Great, but how do I use it?

All documentation (especially for developers) are available at pyatv.dev. 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
    Address: 10.0.10.84
        MAC: AA:BB:CC:DD:EE:FF
 Deep Sleep: False
Identifiers:
 - AA:BB:CC:DD:EE:FF
 - AABBCCDDEEFF
Services:
 - 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 ghcr.io/postlund/pyatv:master atvremote scan

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

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:

Rate & Review

Great Documentation0
Easy to Use0
Performant0
Highly Customizable0
Bleeding Edge0
Responsive Maintainers0
Poor Documentation0
Hard to Use0
Slow0
Buggy0
Abandoned0
Unwelcoming Community0
100