Metadata-Version: 2.4
Name: pympris2
Version: 0.3.0
Summary: An implementation of an MPRIS D-Bus client
Author: Stefan Tatschner
Author-email: Stefan Tatschner <stefan.tatschner@mailbox.org>
License-Expression: EUPL-1.2
Requires-Dist: sdbus>=0.14.2
Requires-Python: >=3.14
Description-Content-Type: text/markdown

<!--
SPDX-FileCopyrightText: 2026 Stefan Tatschner

SPDX-License-Identifier: CC0-1.0
-->

# pympris2

An implementation of the [MPRIS D-Bus Interface Specification](https://specifications.freedesktop.org/mpris/latest/index.html) using sdbus.

## Example

``` python
import asyncio

from pympris2 import get_active_players, MPRISInterface


async def main() -> None:
    player = await get_active_players()[0]
    proxy = MPRISInterface.connect(player)
    await proxy.play_pause()
    print(await proxy.volume)
    await proxy.volume.set_async(0.5)
    # …
 

asyncio.run(main())
```

All methods and properties of the implemented interfaces are available in the `proxy` object.
There is also a CLI tool `mprisctl` available; just check `--help`.

## Implementation Status

* [org.mpris.MediaPlayer2](https://specifications.freedesktop.org/mpris/latest/Media_Player.html) implemented
* [org.mpris.MediaPlayer2.Player](https://specifications.freedesktop.org/mpris/latest/Player_Interface.html) implemented
* [org.mpris.MediaPlayer2.TrackList](https://specifications.freedesktop.org/mpris/latest/Track_List_Interface.html) not implemented
* [org.mpris.MediaPlayer2.Playlists](https://specifications.freedesktop.org/mpris/latest/Playlists_Interface.html) not implemented
