Metadata-Version: 2.1
Name: ampdup
Version: 0.2.4
Summary: A type-hinted async python mpd client library.
Home-page: https://gitlab.com/tarcisioe/ampdup
License: MIT
Keywords: mpd,type,async
Author: Tarcisio Eduardo Moreira Crocomo
Author-email: tarcisio.crocomo+pypi@gmail.com
Requires-Python: >=3.6,<4.0
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.6
Classifier: Programming Language :: Python :: 3.7
Requires-Dist: asyncio-contextmanager (>=1.0,<2.0); python_version >= "3.6" and python_version < "3.7"
Requires-Dist: curio (>=0.9.0,<0.10.0)
Requires-Dist: dataclasses (>=0.6.0,<0.7.0); python_version >= "3.6" and python_version < "3.7"
Description-Content-Type: text/markdown

ampdup
======

A type-hinted async python mpd client library.


Summary
=======

`ampdup` is an async/await based MPD library. It currently uses `curio` as its
means of establishing connections.

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.

```python
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.

