Skip to main content

Bindings for the mixcloud.com API

Project description

Mixcloud.com API access from Python

Build Status Coverage Status

This provides a Python API for the http://mixcloud.com website.

Example

from mixcloud import Mixcloud
m = Mixcloud()
u = m.user('michelplatiniste')
for c in u.cloudcasts():
    print c.name

Uploading

It is possible to use this module to upload cloudcasts. In order to do that you need to be authenticated. To do that, provide an API token to the constructor.

m = mixcloud.Mixcloud(access_token=acces_token)
cc = Cloudcast(...)
with open(mp3_path) as mp3:
    r = m.upload(cc, mp3)

YML file support

It is possible to represent cloudcasts as YAML files. See example.yml.

The relevant keys are:

Key

Type

title

String

desc

String

tags

List of strings

tracks

List of tracks

Each track is a dict with the following keys:

Key

Type

start

Integer

artist

String

track

String

You can leverage YAML syntax for the “start” field: 2:54 will be parsed directly as 174 (then number of seconds).

It is possible to parse such a file with:

with open(yml_path) as yml:
    cc = mixcloud.Cloudcast.from_yml(yml, None)

Mocking

A mock server is provided for testing purposes in mixcloud.mock.

Changelog

0.0.1

release date: 2015-01-28

  • Initial release

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

mixcloud-0.0.1.tar.gz (5.2 kB view details)

Uploaded Source

File details

Details for the file mixcloud-0.0.1.tar.gz.

File metadata

  • Download URL: mixcloud-0.0.1.tar.gz
  • Upload date:
  • Size: 5.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for mixcloud-0.0.1.tar.gz
Algorithm Hash digest
SHA256 0cbe2d0d9049abf818076a8ca4cd0ced30834097523873d91000ac01b3dd3409
MD5 b566e42a6d5606f11a044d7ced081bfb
BLAKE2b-256 8afb6436da1ed607956b4196232552ebed17c7f62e8d8b6f084965686ecd47a3

See more details on using hashes here.

Supported by

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