Asyncio API package for YouTube Music Desktop app (https://ytmdesktop.app/).
Project description
YouTube Music Desktop Remote Control API
Async IO API package for YouTube Music Desktop app.
Installation
python3 -m pip install aioytmdesktopapi
Contents
This package contains the YtmDesktop class which represents the API.
Check the API documentation to see what functionality is available and how to use it.
Example usage
Check example.py for a runnable example.
async with aiohttp.ClientSession() as session:
async with YtmDesktop(session, "192.168.1.123", password="PASSWORD") as ytmdesktop:
# Initialize first before using any of the functionality
await ytmdesktop.initialize()
# Print status of some attributes
print(f"{ytmdesktop.player.has_song=}")
print(f"{ytmdesktop.player.is_paused=}")
print(f"{ytmdesktop.track.author=}")
print(f"{ytmdesktop.track.title=}")
print(f"{ytmdesktop.track.album=}")
# Pause the current track
await ytmdesktop.send_command.track_pause()
# Call `.update()` to update the internal state of the API with the state of the actual player instance
await ytmdesktop.update()
# Print updated state
print(f"{ytmdesktop.player.is_paused=}")
time.sleep(2)
# Play the current track
await ytmdesktop.send_command.track_play()
# Call `.update()` to update the internal state of the API with the state of the actual player instance
await ytmdesktop.update()
# Print updated state
print(f"{ytmdesktop.player.is_paused=}")
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file aioytmdesktopapi-0.1.2.tar.gz.
File metadata
- Download URL: aioytmdesktopapi-0.1.2.tar.gz
- Upload date:
- Size: 11.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.12.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8089b507301591a2acdfbafeb075f2885d6bb85fc36e9da59f3c3c53e991f26a
|
|
| MD5 |
7b955bad99fcbb7d7428d2de9efeaae9
|
|
| BLAKE2b-256 |
4315064db30725e935a853be30c42e787d98f1808e815dab8cfef7390f4c041b
|
File details
Details for the file aioytmdesktopapi-0.1.2-py3-none-any.whl.
File metadata
- Download URL: aioytmdesktopapi-0.1.2-py3-none-any.whl
- Upload date:
- Size: 11.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.12.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bebfdaa1ad9f259cc61b1db3ae7d40729817d809150932fa30da4a7254b62126
|
|
| MD5 |
e226bd2cbcf094abf4ef475e09ba156c
|
|
| BLAKE2b-256 |
914096857edf2338ff9ebb44953d065084fd35516df23f58fd6211edbc6d4e67
|