A client library for Apple TV and AirPlay devices
Maintained. Last release 5 months ago, commits in 1 of the last 26 weeks. Weaker on commit activity and issue handling.
pip install pyatvA client library for Apple TV and AirPlay devices
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 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
- List and switch user accounts
- Add, remove or set audio output devices (e.g. HomePods)
- Keyboard support
- Persistent storage of credentials and settings
...and lots more! A complete list is available here.