Skip to main content

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=}")

Metadata

Release files for aioytmdesktopapi 0.1.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for aioytmdesktopapi 0.1.2
File Size Uploaded
aioytmdesktopapi-0.1.2.tar.gz 11.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for aioytmdesktopapi 0.1.2
File Interpreter ABI Platform
aioytmdesktopapi-0.1.2-py3-none-any.whl Python 3 none any Details

Total release size: 22.0 kB

Release files / aioytmdesktopapi-0.1.2.tar.gz

Download URL aioytmdesktopapi-0.1.2.tar.gz
Size 11.0 kB
Tags Source
SHA-256 checksum
How to use checksums
8089b507301591a2acdfbafeb075f2885d6bb85fc36e9da59f3c3c53e991f26a
BLAKE2b-256 checksum
How to use checksums
4315064db30725e935a853be30c42e787d98f1808e815dab8cfef7390f4c041b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.12.1

Release files / aioytmdesktopapi-0.1.2-py3-none-any.whl

Download URL aioytmdesktopapi-0.1.2-py3-none-any.whl
Size 11.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
bebfdaa1ad9f259cc61b1db3ae7d40729817d809150932fa30da4a7254b62126
BLAKE2b-256 checksum
How to use checksums
914096857edf2338ff9ebb44953d065084fd35516df23f58fd6211edbc6d4e67
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.12.1

Release history Release notifications | RSS feed

This release

0.1.2 This release

2 release files

0.1.1

2 release files

0.1.0

2 release files

0.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page