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 replacement for Reddit /r/copypasta CummyBot2000 with extra measures to avoid it being banned.

CummyBot1984 A replacement for Reddit /r/copypasta's CummyBot2000 with extra measures to respect Reddit's API rules. Features Copies and replies to ev

2 Feb 21, 2022
EthSema - Binary translator for Ethereum 2.0

EthSema is a novel EVM-to-eWASM bytecode translator that can not only ensure the fidelity of translation but also fix commonly-seen vulnerabilities in smart contracts.

weimin 8 Mar 01, 2022
Powerful Telegram Maintained UserBot in Telethon

Fire-X UserBot The Awaited Bot Fire-X userbot The Most Powerful Telegram Userbot. This Userbot is Safe to use in Your Telegram Account. It is not like

22 Oct 21, 2022
Python client for Toyota North America service API

toyota-na Python client for Toyota North America service API Install pip install toyota-na[qt] [qt] is required for generating authorization code. Us

Gavin Ni 18 Sep 06, 2022
A comand-line utility for taking automated screenshots of websites

shot-scraper A comand-line utility for taking automated screenshots of websites For background on this project see shot-scraper: automated screenshots

Simon Willison 837 Jan 07, 2023
Project to list all resources in an AWS account with tags.

AWS-ListAll Project to list all resources in an AWS account with tags. This script works on any system Get started: Install python3 and pip3 along wit

Connor Shubham Verlekar 3 Jan 30, 2022
The Best Telegram UserBot Made With Pyrogram [Python]

Asterix UserBot A Powerful Telegram userbot based on Pyrogram. How To Deploy Asterix Heroku Railway Qovery Termux Tutorial Railway Deploy Comming Soon

TeamAsterix 9 Oct 17, 2022
A Discord webhook spammer made in Python

A Python made Discord webhook spammer usually used for token loggers to spam them/delete them original by cattyn changes listed below.

2 Jan 12, 2022
My Advent of Code solutions. I also upload videos of my solves: https://www.youtube.com/channel/UCuWLIm0l4sDpEe28t41WITA

My solutions to adventofcode.com puzzles. I post videos of me solving the puzzles in real-time at https://www.youtube.com/channel/UCuWLIm0l4sDpEe28t41

195 Jan 04, 2023
Weather App using openweathermap API

This is my hobby project used to learn how to use public api for project.In this i used the api of openweathermap to featch the weather details of various city across the globe by giving city name as

Subramanya K S 1 Nov 06, 2021
:evergreen_tree: Python module for communicating with the Taiga API

python-taiga A python wrapper for the Taiga REST API. Documentation: https://python-taiga.readthedocs.io/ Usage: : https://python-taiga.readthedocs.io

Nephila 87 Oct 12, 2022
Simple-nft-tutorial - A simple tutorial on making nft/memecoins on algorand

nft/memecoin Tutorial on Algorand Let's make a simple NFT/memecoin on the Algora

2 Feb 05, 2022
Source code for Profile REST API

PROJECT PROFILE REST API Creating local development server: We will create a local development server that can run and test our API as we build it. We

1 Mar 29, 2022
A MassDM selfbot which is working in 2021

mass-dm-discord - Little preview of the Logger and the Spammer Features Logging User IDS Sending DMs to the logged IDs Blacklist IDs (add the ID of th

karma.meme 88 Dec 26, 2022
Implement SAST + DAST through Github actions

Implement SAST + DAST through Github actions The repository is supposed to implement SAST+DAST checks using github actions against a vulnerable python

Syed Umar Arfeen 3 Nov 09, 2022
Python library to interact with a Z-Wave JS server.

zwave-js-server-python Python library for communicating with zwave-js-server. Goal for this library is to replicate the structure and the events of Z-

Home Assistant Libraries 54 Dec 18, 2022
Un petit tool qui est la pour envoier des message avec des webhook en bêta

📎 Webhook-discord Le but de se tool c'est que tu peux envoier vos webhook discord sur vos serveur et les customiser Pour lancer le projet il faut avo

2 Oct 10, 2021
Slack bot for monitoring your Metaflow flows!

Metaflowbot - Slack Bot for your Metaflow flows! Metaflowbot makes it fun and easy to monitor your Metaflow runs, past and present. Imagine starting a

Outerbounds 21 Dec 07, 2022
API RestFull web de pontos turisticos de certa região

##RESTful Web API para exposição de pontos turísticos de uma região## Propor um novo ponto turístico Moderação dos pontos turísticos cadastrados Lista

Lucas Silva 2 Jan 28, 2022