Skip to main content

A type-hinted async python mpd client library.

Project description

ampdup

A type-hinted async python mpd client library.

Summary

ampdup is an async/await based MPD library.

It is fully type-hinted and MPD responses are typed as well, so it is able to play nicely with mypy and autocompletion such as what is provided by jedi.

Examples

First a basic usage example. make() returns a connected client as a context manager that handles disconnection automatically.

async def main():
    async with MPDClient.make('localhost', 6600) as m:
        await m.play()

The IdleClient class provides the idle() function. Since ampdup is async/await-based this loop can easily run concurrently with other operations.

async def observe_state():
    async with IdleClient.make('localhost', 6600) as i:
        while True:
            changed = await i.idle()
            handle_changes(changed)

Todo

  • Support command lists.
  • Support connecting through Unix socket.
  • Support the more obscure MPD features such as partitions.

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

ampdup-0.10.0.tar.gz (15.2 kB view details)

Uploaded Source

Built Distribution

ampdup-0.10.0-py3-none-any.whl (17.5 kB view details)

Uploaded Python 3

File details

Details for the file ampdup-0.10.0.tar.gz.

File metadata

  • Download URL: ampdup-0.10.0.tar.gz
  • Upload date:
  • Size: 15.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.0.0 CPython/3.8.0 Linux/5.4.14-arch1-1

File hashes

Hashes for ampdup-0.10.0.tar.gz
Algorithm Hash digest
SHA256 df53661d30a565c9c4b3017b8e5f0f24f3d62e535bd69213c67c1a2643d165a3
MD5 90e6cb964c62bd72ac87bc3a4855e3a3
BLAKE2b-256 da26f7ecb40d324a97f0af17a19fd72353cc3de4df71317608901c1d94ff6e88

See more details on using hashes here.

File details

Details for the file ampdup-0.10.0-py3-none-any.whl.

File metadata

  • Download URL: ampdup-0.10.0-py3-none-any.whl
  • Upload date:
  • Size: 17.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.0.0 CPython/3.8.0 Linux/5.4.14-arch1-1

File hashes

Hashes for ampdup-0.10.0-py3-none-any.whl
Algorithm Hash digest
SHA256 c3b2b22c5048483576955a9d3530be0c95d029ad48a33b3dffda2c8ca438c716
MD5 e9be78951f7232e7de9e77ccfeac5513
BLAKE2b-256 89eadc769d8709d778279ff7c7b2ac06994edfce07ed3fcd4399d994405dc0c4

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page