Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/amikrop/aiomixcloud
Mixcloud API wrapper for Python and Async IO
https://github.com/amikrop/aiomixcloud
aiohttp api-wrapper asyncio mixcloud python python3
Last synced: 21 days ago
JSON representation
Mixcloud API wrapper for Python and Async IO
- Host: GitHub
- URL: https://github.com/amikrop/aiomixcloud
- Owner: amikrop
- License: mit
- Created: 2019-04-01T16:36:23.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2024-02-27T15:39:39.000Z (10 months ago)
- Last Synced: 2024-12-12T01:40:54.111Z (22 days ago)
- Topics: aiohttp, api-wrapper, asyncio, mixcloud, python, python3
- Language: Python
- Homepage: https://pypi.org/project/aiomixcloud/
- Size: 130 KB
- Stars: 30
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.rst
- License: LICENSE
Awesome Lists containing this project
README
aiomixcloud
~~~~~~~~~~~Mixcloud API wrapper for Python and Async IO
--------------------------------------------.. image:: https://img.shields.io/pypi/v/aiomixcloud.svg
:target: https://pypi.org/project/aiomixcloud/
:alt: PyPI.. image:: https://img.shields.io/pypi/l/aiomixcloud.svg
:target: https://pypi.org/project/aiomixcloud/
:alt: PyPI - License.. image:: https://img.shields.io/pypi/pyversions/aiomixcloud.svg
:target: https://pypi.org/project/aiomixcloud/
:alt: PyPI - Python Version.. image:: https://codecov.io/gh/amikrop/aiomixcloud/branch/master/graph/badge.svg
:target: https://codecov.io/gh/amikrop/aiomixcloud
:alt: Coverage.. image:: https://readthedocs.org/projects/aiomixcloud/badge/?version=latest
:target: https://aiomixcloud.readthedocs.io/en/latest/?badge=latest
:alt: Documentation Status*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.Installation
------------The following Python versions are supported:
- CPython: 3.6, 3.7, 3.8, 3.9
- PyPy: 3.5Install via `pip
`_:.. code-block:: bash
pip install aiomixcloud
Usage
-----You can start using *aiomixcloud* as simply as:
.. code-block:: python
from aiomixcloud import Mixcloud
# Inside your coroutine:
async with Mixcloud() as mixcloud:
cloudcast = await mixcloud.get('bob/cool-mix')# Data is available both as attributes and items
cloudcast.user.name
cloudcast['pictures']['large']# Iterate over associated resources
for comment in await cloudcast.comments():
comment.urlA variety of possibilities is enabled during `authorized usage
`_:.. code-block:: python
# Inside your coroutine:
async with Mixcloud(access_token=access_token) as mixcloud:
# Follow a user
user = await mixcloud.get('alice')
await user.follow()# Upload a cloudcast
await mixcloud.upload('myshow.mp3', 'My Show', picture='myshow.jpg')For more details see the `usage page
`_
of the `documentation `_.License
-------Distributed under the `MIT License
`_.