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)
AWS Serverless Application Model (SAM) is an open-source framework for building serverless applications

AWS Serverless Application Model (AWS SAM) The AWS Serverless Application Model (SAM) is an open-source framework for building serverless applications

Amazon Web Services 8.9k Dec 31, 2022
Spotify Web API client for Python 3

Welcome to the GitHub repository of Tekore! We provide a client for the Spotify Web API for Python, complete with all available endpoints and authenti

Felix Hildรฉn 186 Dec 22, 2022
Lamblayer: a minimal deployment tool for AWS Lambda layers

lamblayer lamblayer is a minimal deployment tool for AWS Lambda layers. lamblayer does, Create a Layers of built pip-installable python packages. Crea

Yusuke Takahashi 2 Aug 19, 2022
A GitHub Action that automatically reports your Advent of Code progress in a table in your README

Advent README Stars This action adds and maintains a stars report in your README based on your Advent of Code progress. Example Table 2021 Results Day

Kevin Duff 36 Dec 30, 2022
Telegram Client and Bot that use Artificial Intelligence to auto-reply to scammers and waste their time

scamminator Blocking a scammer is not enough. It is time to fight back. Wouldn't be great if there was a tool that uses Artificial Intelligence to rep

Federico Galatolo 6 Nov 12, 2022
A Phyton script working for stream twits from twitter by tweepy to mongoDB

twitter-to-mongo A python script that uses the Tweepy library to pull Tweets with specific keywords from Twitter's Streaming API, and then stores the

3 Feb 03, 2022
Unofficial API wrapper for seedr.cc

Seedr API Unofficial API wrapper for seedr.cc Inspired by theabbie's seedr-api Powered by @harp_tech (Telegram) How to use You can install lib via git

Anjana Madu 49 Oct 24, 2022
A simple Discord Bot created for basic functionality and fun chat commands for use in a private server.

LoveAndChaos-Bot v0.1.0 LoveAndChaos-Bot is a Discord Bot specifically designed for a private server; this bot is merely a test and a method to expose

Morgan Rose 1 Dec 12, 2021
An open source raffle bot made to increase the chance of winning limited sneaker raffles by automating entries.

๐Ÿš€ SyneziaRaffles An open source raffle bot made to increase the chance of winning limited sneaker raffles by automating entries. ๐Ÿ„โ€โ™‚๏ธ Quick Start Pr

Alexis M. 29 Dec 22, 2022
The Fastest multi spambot of Telegram ๐Ÿคž ๐Ÿคž

Revil Spam Bot The Fastest multi spambot of Telegram ๐Ÿคž ๐Ÿคž ๐š‚๐š„๐™ฟ๐™ฟ๐™พ๐š๐šƒ ๐Ÿ–ค แด„ส€แด‡แด€แด›แดส€ ๐Ÿ–ค โšก ๐“ก๐“ฎ๐“ฟ๐“ฒ๐“ต ๐“—๐“พ๐“ท๐“ฝ๐“ฎ๐“ป ๐”๐”ฒ๐”ฉ๐”ฑ๐”ฆ แบžรธโœž๏ธŽ โšก ๐“ ๐•พะผฮฟฮฟฯ„ะฝ ๐“ะธโˆ‚ ๐•ฑ

REVIL HUNTER 4 Dec 08, 2021
A Bot Telegram Anti Users Channel to automatic ban users who using channel to send message in group.

Tg_Anti_UsersChannel A Bot Telegram Anti Users Channel to automatic ban users who using channel to send message in group. Features: Automatic ban Whit

idzeroid 6 Dec 26, 2021
Telegram Userbot built with Pyrogram

Pyrogram Userbot A Telegram Userbot based on Pyrogram This repository contains the source code of a Telegram Userbot and the instructions for running

Athfan Khaleel 113 Jan 03, 2023
An iCal file to transport you to a new place every day until you die

everydayvirtualvacation An iCal file to transport you to a new place every day until you die The library is closed ๐Ÿ˜” ๐Ÿ˜” including a video of the plac

Jacob Chapman 33 Apr 19, 2022
A powerful, cool and well-made userbot for your Telegram profile with promising extension capabilities.

Telecharm userbot A powerful, fast and simple Telegram userbot written in Python 3 and based on Pyrogram 1.X. Currently in active WIP state, so feel f

Daniil Kovalenko 16 Dec 01, 2022
A bot to get Statistics like the Playercount from your Minecraft-Server on your Discord-Server

Hey Thanks for reading me. Warning: My English is not the best I have programmed this bot to show me statistics about the player numbers and ping of m

spaffel 12 Sep 24, 2022
Starlink Order Status Notification

Starlink Order Status Notification This script logs into Starlink order portal, pulls your estimated delivery date and emails it to a designated email

Aaron R. 1 Jul 08, 2022
The program for obtaining a horoscope in Python using API from rapidapi.com site.

Python horoscope The program allows you to get a horoscope for your zodiac sign and immediately translate it into almost any language. Step 1 The firs

Architect 0 Dec 25, 2021
A discord nuking tool made by python, this also has nuke accounts, inbuilt Selfbot, Massreport, Token Grabber, Nitro Sniper and ALOT more!

Disclaimer: Rage Multi Tool was made for Educational Purposes This project was created only for good purposes and personal use. By using Rage, you agr

โ€ โ€  50 Jul 19, 2022
Elemeno.ai standard development kit in Python

Overview A set of glue code and utilities to make using elemeno AI platform a smooth experience Free software: Apache Software License 2.0 Installatio

Elemeno AI 3 Dec 14, 2022
Basic Python3 request wrapper for the PancakeSwap API

๐Ÿ Python Pancakes ๐Ÿฅž A simple request wrapper for the Pancake-Swap API. Installation Install package # Using pip $ pip install pythonpancakes # Or f

Scott Burlovich 30 Nov 20, 2022