Skip to main content

Mixcloud API wrapper for Python and Async IO

Project description

Mixcloud API wrapper for Python and Async IO

PyPI PyPI - License PyPI - Python Version Coverage Build Status 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

  • PyPy: 3.5

Install via pip:

pip install aiomixcloud

Usage

You can start using aiomixcloud as simply as:

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.url

A variety of possibilities is enabled during authorized usage:

# 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.

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

aiomixcloud-1.0.1.tar.gz (17.4 kB view details)

Uploaded Source

Built Distribution

aiomixcloud-1.0.1-py3-none-any.whl (22.2 kB view details)

Uploaded Python 3

File details

Details for the file aiomixcloud-1.0.1.tar.gz.

File metadata

  • Download URL: aiomixcloud-1.0.1.tar.gz
  • Upload date:
  • Size: 17.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.3

File hashes

Hashes for aiomixcloud-1.0.1.tar.gz
Algorithm Hash digest
SHA256 51138d170e69c4fff7c561d55d64c1ae47b560e69eee2d61cdbddf5f4ea82e39
MD5 05b9cf69edb9d6d7281e483e6d762d36
BLAKE2b-256 aec656937f1c70e0ebbb9417e6c763975fd73236bd3827c6847de0e9b198644f

See more details on using hashes here.

Provenance

File details

Details for the file aiomixcloud-1.0.1-py3-none-any.whl.

File metadata

  • Download URL: aiomixcloud-1.0.1-py3-none-any.whl
  • Upload date:
  • Size: 22.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.3

File hashes

Hashes for aiomixcloud-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 7d7c95489d1eb1d2915f63bc1cc803ac3b707144fb8d76ee75af81413da4213e
MD5 f32580a2565646b197e20725407ec5d1
BLAKE2b-256 2b12ac0d33d1eaa097977fe653fea1959fec495b00fdb2d77f2be956736137c6

See more details on using hashes here.

Provenance

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page