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

Uploaded Source

Built Distribution

ampdup-0.8.0-py3-none-any.whl (49.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: ampdup-0.8.0.tar.gz
  • Upload date:
  • Size: 14.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/0.12.11 CPython/3.7.3 Linux/4.15.0-45-generic

File hashes

Hashes for ampdup-0.8.0.tar.gz
Algorithm Hash digest
SHA256 ad6c180a551310180d13d580bdf9de3b47070a3c299eab4f3c0a7f44cb2b422f
MD5 e45e912aeead55c91e6f402a4770fbd0
BLAKE2b-256 e99a0f7550d7d6dbe4241c43d4480e0807c3d472af4abd9ade3fbf7a4600641e

See more details on using hashes here.

File details

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

File metadata

  • Download URL: ampdup-0.8.0-py3-none-any.whl
  • Upload date:
  • Size: 49.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/0.12.11 CPython/3.7.3 Linux/4.15.0-45-generic

File hashes

Hashes for ampdup-0.8.0-py3-none-any.whl
Algorithm Hash digest
SHA256 75c4528a8e15481a98a78c9d029c5a78d6176370449fe28ba50159623bd7ffc3
MD5 3ac76a5f391e5dbfc036647738bd0204
BLAKE2b-256 63edf6cbd5b5a7fa00de7ec76e7e238f270cd0b8a3ccd10828cdd9829a692a2f

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