aiomixcloud is a wrapper library for the HTTP API of Mixcloud. It supports asynchronous operation via asyncio and specifically the aiohttp framework. aiomixcloud tries to be abstract and independent of the API's transient structure, meaning it is not tied to specific JSON fields and resource types. That is, when the API changes or expands, the library should be ready to handle it.
The following Python versions are supported:
- CPython: 3.6, 3.7, 3.8, 3.9
- PyPy: 3.5
Install via pip:
pip install aiomixcloudYou can start using aiomixcloud as simply as:
fromaiomixcloudimportMixcloud# Inside your coroutine:asyncwithMixcloud() asmixcloud: cloudcast=awaitmixcloud.get('bob/cool-mix') # Data is available both as attributes and itemscloudcast.user.namecloudcast['pictures']['large'] # Iterate over associated resourcesforcommentinawaitcloudcast.comments(): comment.urlA variety of possibilities is enabled during authorized usage:
# Inside your coroutine:asyncwithMixcloud(access_token=access_token) asmixcloud: # Follow a useruser=awaitmixcloud.get('alice') awaituser.follow() # Upload a cloudcastawaitmixcloud.upload('myshow.mp3', 'My Show', picture='myshow.jpg')For more details see the usage page of the documentation.
Distributed under the MIT License.