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

Uploaded Source

Built Distribution

ampdup-0.6.0-py3-none-any.whl (47.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: ampdup-0.6.0.tar.gz
  • Upload date:
  • Size: 14.5 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.6.0.tar.gz
Algorithm Hash digest
SHA256 29b93188665db81d1ad545ddf06920b6d5584389df5f892c061d91397b730112
MD5 7742f5d88592aef91e38c333df76db58
BLAKE2b-256 57dc656346d948aa24da30dee68f10b01aa63ec72b32a1e641e532b0c849d535

See more details on using hashes here.

File details

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

File metadata

  • Download URL: ampdup-0.6.0-py3-none-any.whl
  • Upload date:
  • Size: 47.0 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.6.0-py3-none-any.whl
Algorithm Hash digest
SHA256 affc2bc81c163d5da8ecabfea72bded659df8672f2ad68ec6ae3238e6cb98404
MD5 722280f6801c7000ac0bddd2e46451cf
BLAKE2b-256 7ea5392e6544d53ac9b2abaa6f45ff207b8cb9139e137a18057fab322f4ac8c1

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