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.3.0.tar.gz (12.2 kB view details)

Uploaded Source

Built Distribution

ampdup-0.3.0-py3-none-any.whl (39.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: ampdup-0.3.0.tar.gz
  • Upload date:
  • Size: 12.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/0.12.9 CPython/3.7.1 Linux/4.19.4-arch1-1-ARCH

File hashes

Hashes for ampdup-0.3.0.tar.gz
Algorithm Hash digest
SHA256 51753496546df655dd17bab1a25c3ed492c39b5286c8873aa91466f8d38e1c8a
MD5 2620cd3155e4361b16b16078e0b1db01
BLAKE2b-256 eafd3d2025cacd96d7be46bdfb52e54b061200ea2859d3cc07a5a1393db8464d

See more details on using hashes here.

File details

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

File metadata

  • Download URL: ampdup-0.3.0-py3-none-any.whl
  • Upload date:
  • Size: 39.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/0.12.9 CPython/3.7.1 Linux/4.19.4-arch1-1-ARCH

File hashes

Hashes for ampdup-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 672dc31326128b990d1ade8f46600f1edb366a9cc901ea8b021bdb801b49ac79
MD5 638e615b23879b1f1b8b11ad9f6dfa38
BLAKE2b-256 ac91d22da71df7b3c11850fa084efb5e088776fe92021390a671c6a8f4cbe3b1

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