Mixcloud API wrapper for Python and Async IO

Overview

aiomixcloud

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, 3.9
  • 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.

You might also like...
Async wrapper over hentaichan.live

hentai-chan-api-async is a small asynchronous parser library that will allow you to easily use manga from https://hentaichan.live Recommended to use python3.7+

Aws-lambda-requests-wrapper - Request/Response wrapper for AWS Lambda with API Gateway

AWS Lambda Requests Wrapper Request/Response wrapper for AWS Lambda with API Gat

Aio-binance-library - Async library for connecting to the Binance API on Python

aio-binance-library Async library for connecting to the Binance API on Python Th

Powerful and Async API for AnimeWorld.tv ๐Ÿš€

Powerful and Async API for AnimeWorld.tv ๐Ÿš€

Async client API for the Telegram Group Calls
Async client API for the Telegram Group Calls

PyTgCalls This project allow to make Telegram group call with MTProto Api using Pyrogram and WebRTC, this is possible thanks to the power of NodeJS's

Revolt.py - An async library to interact with the https://revolt.chat api.

Revolt.py An async library to interact with the https://revolt.chat api. This library will be focused on making bots and i will not implement anything

PRAW, an acronym for "Python Reddit API Wrapper", is a python package that allows for simple access to Reddit's API.

PRAW: The Python Reddit API Wrapper PRAW, an acronym for "Python Reddit API Wrapper", is a Python package that allows for simple access to Reddit's AP

PRAW, an acronym for "Python Reddit API Wrapper", is a python package that allows for simple access to Reddit's API.

PRAW: The Python Reddit API Wrapper PRAW, an acronym for "Python Reddit API Wrapper", is a Python package that allows for simple access to Reddit's AP

Python API wrapper around Trello's API

A wrapper around the Trello API written in Python. Each Trello object is represented by a corresponding Python object. The attributes of these objects

Comments
  • Upload of Flac files

    Upload of Flac files

    Hi there,

    can you think of any limitation preventing me from upload flac files? While this works fine using the WebUI of Mixcloud, I always end up with a concurrent.futures._base.TimeoutError. Full trace:

    data = mixcloud.upload(file_path_and_name, show_name) File "/home/pi/.local/lib/python3.7/site-packages/aiomixcloud/sync.py", line 55, in sync_method return loop.run_until_complete(attribute(*args, **kwargs)) File "/usr/lib/python3.7/asyncio/base_events.py", line 584, in run_until_complete return future.result() File "/home/pi/.local/lib/python3.7/site-packages/aiomixcloud/decorators.py", line 174, in wrapper return await coroutine(self, *args, params=params, **kwargs) File "/home/pi/.local/lib/python3.7/site-packages/aiomixcloud/decorators.py", line 112, in wrapper return await coroutine(self, *args, **kwargs) File "/home/pi/.local/lib/python3.7/site-packages/aiomixcloud/core.py", line 412, in upload return await self._upload(params, data, url) File "/home/pi/.local/lib/python3.7/site-packages/aiomixcloud/core.py", line 387, in _upload async with self._session.post(final_url, data=data) as response: File "/home/pi/.local/lib/python3.7/site-packages/aiohttp/client.py", line 1012, in __aenter__ self._resp = await self._coro File "/home/pi/.local/lib/python3.7/site-packages/aiohttp/client.py", line 504, in _request await resp.start(conn) File "/home/pi/.local/lib/python3.7/site-packages/aiohttp/client_reqrep.py", line 860, in start self._continue = None File "/home/pi/.local/lib/python3.7/site-packages/aiohttp/helpers.py", line 596, in __exit__ raise asyncio.TimeoutError from None concurrent.futures._base.TimeoutError

    Tested this on both Debian Buster and Windows 10, same issue- with or without async upload. I know there is a file limit/ size assertion and I commented that out in the core.py.

    Cheers, J

    opened by fa7ecc1f76 8
  • Dashboard API Access?

    Dashboard API Access?

    Happened upon the reddit post where this app was posted...

    Are you aware of any endpoints with mixcloud where you can query the main homepage that is tailored to the currently logged in user?

    Below is an example screenshot of what I'm referring to...

    image

    opened by qwertycody 3
  • SyntaxError: 'async with' outside async function

    SyntaxError: 'async with' outside async function

    I'm trying to get even just the basic example in the README and am getting this error straight away.

    I'm new to python, and am using 3.7, so I'm wondering if I need to downgrade to an old version, or if the documentation is out of date.

    I get it working (sort of) by wrapper everything in an async function and calling it with asyncio.run(_main()) but that seems like it defeats the purpose of your library.

    opened by lockykeaney 1
Releases(v1.0.6)
A python script that automatically farms the Discord bot 'Dank Memer'.

Dank Farmer A python script that automatically farms the Discord bot 'Dank Memer'. Requirements pynput Disclaimer DO NOT use if you are not willing to

2 Dec 30, 2021
Riffdog Terraform scanner - finding 'things' in the Real World (aka AWS) which Terraform didn't put there.

riffdog Riffdog Terraform / Reality scanner - finding 'things' in the Real World which Terraform didn't put there. This project works by firstly loadi

Riffdog 4 Mar 23, 2020
Develop and deploy applications with the Ionburst Cloud Python SDK.

Ionburst SDK for Python The Ionburst SDK for Python enables developers to easily integrate with Ionburst Cloud, building in ultra-secure and private o

Ionburst Cloud 3 Mar 06, 2022
Official Python client for the MonkeyLearn API. Build and consume machine learning models for language processing from your Python apps.

MonkeyLearn API for Python Official Python client for the MonkeyLearn API. Build and run machine learning models for language processing from your Pyt

MonkeyLearn 157 Nov 22, 2022
My beancount practice as a template

my-beancount-template ไธชไบบ Beancount ๆ–นๆกˆ็š„ๆจกๆฟไป“ๅบ“ ็›ธๅ…ณๅšๅฎข ๅคๅผ่ฎฐ่ดฆๆŒ‡ๅŒ—๏ผˆไธ€๏ผ‰๏ผšWhat and Why๏ผŸ ๅคๅผ่ฎฐ่ดฆๆŒ‡ๅŒ—๏ผˆไบŒ๏ผ‰๏ผšๅš่ดฆๆ–นๆณ•่ฎบ ๅคๅผ่ฎฐ่ดฆๆŒ‡ๅŒ—๏ผˆไธ‰๏ผ‰๏ผšๅฆ‚ไฝ•ๆ‰“้€ ไธๅŠ้€”่€ŒๅบŸ็š„่ฎฐ่ดฆๆ–นๆกˆ ้…็ฝฎ ่ฏฆ็ป†้…็ฝฎ่ฏทๅ‚่€ƒๅšๅฎขไธ‰ใ€‚ๅฟ…้กปไฟฎๆ”น็š„้…็ฝฎๆœ‰๏ผš BotๅŠŸ่ƒฝ๏ผšdata/be

KAAAsS 29 Nov 29, 2022
Lumberjack-bot - A game bot written for Lumberjack game at Telegram platform

This is a game bot written for Lumberjack game at Telegram platform. It is devel

UฤŸur Uysal 6 Apr 07, 2022
A compatability shim between Discord.py and Hikari.

Usage as a partial shim: import discord import hikari import hikari_shim dpy_bot = discord.Client(intents=discord.Intents.all(), enable_debug_events=

EXPLOSION 3 Dec 25, 2021
Enigma simulator with python and clean code.

Enigma simulator with python and clean code.

Mohammad Dori 3 Jul 21, 2022
This bot will delete messages containing blacklisted words in your telegram groups.

Profanity Detector Bot This bot will delete messages containing blacklisted words in your telegram groups. Made using ProfanityDetector.

Aditya 17 Oct 08, 2022
Get-Phone-Number-Details-using-Python - To get the details of any number, we can use an amazing Python module known as phonenumbers.

Get-Phone-Number-Details-using-Python To get the details of any number, we can use an amazing Python module known as phonenumbers. We can use the amaz

Coding Taggers 1 Jan 01, 2022
Quot-a-lecture - Lecture transcript question extraction

Setup virtualenv venv source venv/bin/activate pip install -r requirements.txt

Pratyaksh Sharma 5 Sep 12, 2022
A Simple Telegram Inline Torrent Search Bot by @infotechIT

Torrent-Search-RoBot A Simple Telegram Inline Torrent Search Bot by @infotechIT. Torrent API Using api.infotech.wtf API Host Bot Deploy to Heroku Clic

InfoTech 0 May 05, 2022
veez music bot is a telegram music bot project, allow you to play music on voice chat group telegram.

๐ŸŽถ VEEZ MUSIC BOT Veez Music is a telegram bot project that's allow you to play music on telegram voice chat group. Requirements ๐Ÿ“ FFmpeg NodeJS node

levina 143 Jun 19, 2022
A light wrapper around FedEx's SOAP API.

Python FedEx SOAP API Module Author: Greg Taylor, Radek Wojcik Maintainer: Python FedEx Developers License: BSD Status: Stable What is it? A light wra

155 Dec 16, 2022
PyMusic Player is a music player written in python3.

PyMusic Player is a music player written in python3. It harvests r

PythonSerious 2 Jan 30, 2022
Easy to use API Wrapper for somerandomapi.ml.

Overview somerandomapi is an API Wrapper for some-random-api.ml Examples Asynchronous from somerandomapi import Animal import asyncio async def main

Myxi 1 Dec 31, 2021
Discord bot written in discord.py

Orion Discord bot written in discord.py Installation Installation of code is supported for macOS only currently First open the terminal. If incase you

Zeus 3 May 19, 2022
API kumpulan doa-doa sesuai al-qur'an dan as-sunnah

API kumpulan doa-doa sesuai al-qur'an dan as-sunnah

Miftah Afina 4 Nov 26, 2022
A taskbar clock for secondary taskbars on Windows 11

ElevenClock A taskbar clock for secondary taskbars on Windows 11. When microsoft's engineers were creating Windows 11, they forgot to add a clock on t

Martรญ Climent 1.7k Jan 07, 2023