{ "info": { "author": "Etienne Millon", "author_email": "me@emillon.org", "bugtrack_url": null, "classifiers": [ "Development Status :: 3 - Alpha", "Intended Audience :: Developers", "License :: OSI Approved :: BSD License", "Operating System :: OS Independent", "Programming Language :: Python :: 2", "Programming Language :: Python :: 3" ], "description": "Mixcloud.com API access from Python\n-----------------------------------\n\n|Build Status| |Coverage Status|\n\nThis provides a Python API for the http://mixcloud.com website.\n\nExample\n-------\n\n.. code:: python\n\n from mixcloud import Mixcloud\n m = Mixcloud()\n u = m.user('michelplatiniste')\n for c in u.cloudcasts():\n print c.name\n\nAuthorization\n-------------\n\nYou must have an application registered with Mixcloud and a corresponding\nclient ID and secret.\n\nAuthorization is a multi-step process:\n\n1. Generate the authorization URL\n2. Redirect the user to the URL to authorize your application\n3. Collect the `code` query string parameter from the redirect\n4. Exchange the code for an access token\n\n.. code:: python\n\n o = mixcloud.MixcloudOauth(\n client_id=client_id, client_secret=client_secret,\n redirect_uri=redirect_uri)\n\n url = o.authorize_url()\n\n # Next redirect the user to `url`. They will be redirected to your\n # redirect uri with a `code` query string parameter. This must be\n # exchanged with Mixcloud for an access token.\n\n access_token = o.exchange_token(code)\n\n # This can then be used for calls that required authorization.\n\n m = mixcloud.Mixcloud(access_token=access_token)\n print(m.me())\n\nOptionally you can store an access token in your `.netrc` file and it\nwill be used automatically. The machine name must be `mixcloud-api`.\n\nE.g.::\n\n machine mixcloud-api\n password my_access_token\n\nUploading\n---------\n\nIt is possible to use this module to upload cloudcasts. In order to do\nthat you need to be authenticated. To do that, provide an API token to\nthe constructor.\n\n.. code:: python\n\n m = mixcloud.Mixcloud(access_token=access_token)\n cc = Cloudcast(...)\n with open(mp3_path) as mp3:\n r = m.upload(cc, mp3)\n\nYML file support\n----------------\n\nIt is possible to represent cloudcasts as YAML files. See\n``example.yml``.\n\nThe relevant keys are:\n\n+----------+-------------------+\n| Key | Type |\n+==========+===================+\n| title | String |\n+----------+-------------------+\n| desc | String |\n+----------+-------------------+\n| tags | List of strings |\n+----------+-------------------+\n| tracks | List of tracks |\n+----------+-------------------+\n\nEach track is a dict with the following keys:\n\n+----------+-----------+\n| Key | Type |\n+==========+===========+\n| start | Integer |\n+----------+-----------+\n| artist | String |\n+----------+-----------+\n| track | String |\n+----------+-----------+\n\nYou can leverage YAML syntax for the \"start\" field: ``2:54`` will be\nparsed directly as 174 (then number of seconds).\n\nIt is possible to parse such a file with:\n\n.. code:: python\n\n with open(yml_path) as yml:\n cc = mixcloud.Cloudcast.from_yml(yml, None)\n\nMocking\n-------\n\nA mock server is provided for testing purposes in ``mixcloud.mock``.\n\n.. |Build Status| image:: https://img.shields.io/travis/emillon/mixcloud/master.svg\n :target: http://travis-ci.org/emillon/mixcloud\n.. |Coverage Status| image:: https://img.shields.io/coveralls/emillon/mixcloud/master.svg\n :target: https://coveralls.io/r/emillon/mixcloud\n\n\nChangelog\n=========\n\n0.4.0\n-----\n**release date:** 2015-10-27\n\n* Switch to semantic versioning.\n* Include access token when calling /me (#10)\n* Add a helper class for OAuth (#11)\n* Support access token stored in netrc (#9, #12)\n\n0.0.3\n-----\n**release date:** 2015-03-15\n\n* Pictures can be uploaded and retrieved (#6)\n* Include LICENSE in tarball (#8)\n\n0.0.2\n-----\n**release date:** 2015-01-28\n\n* Switch from requirements.txt to install_requires (#7)\n* Add HISTORY.rst to MANIFEST.in\n\n0.0.1\n-----\n**release date:** 2015-01-28\n\n* Initial release", "description_content_type": null, "docs_url": null, "download_url": null, "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/emillon/mixcloud", "keywords": null, "license": "BSD", "maintainer": null, "maintainer_email": null, "name": "mixcloud", "package_url": "https://pypi.org/project/mixcloud/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/mixcloud/", "project_urls": { "Homepage": "https://github.com/emillon/mixcloud" }, "release_url": "https://pypi.org/project/mixcloud/0.4.0/", "requires_dist": null, "requires_python": null, "summary": "Bindings for the mixcloud.com API", "version": "0.4.0" }, "last_serial": 1787991, "releases": { "0.0.1": [ { "comment_text": "", "digests": { "md5": "b566e42a6d5606f11a044d7ced081bfb", "sha256": "0cbe2d0d9049abf818076a8ca4cd0ced30834097523873d91000ac01b3dd3409" }, "downloads": -1, "filename": "mixcloud-0.0.1.tar.gz", "has_sig": true, "md5_digest": "b566e42a6d5606f11a044d7ced081bfb", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5201, "upload_time": "2015-01-28T16:07:44", "url": "https://files.pythonhosted.org/packages/8a/fb/6436da1ed607956b4196232552ebed17c7f62e8d8b6f084965686ecd47a3/mixcloud-0.0.1.tar.gz" } ], "0.0.2": [ { "comment_text": "", "digests": { "md5": "13a153635848708754beacbe0412bdd6", "sha256": "81cb7785a306eaa4d749c26a33e202a9884572e818e415d36639701cf2bb3f6f" }, "downloads": -1, "filename": "mixcloud-0.0.2.tar.gz", "has_sig": true, "md5_digest": "13a153635848708754beacbe0412bdd6", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5336, "upload_time": "2015-01-28T17:35:38", "url": "https://files.pythonhosted.org/packages/61/ca/3d532af6c3d07121335f6103c74293f9c57015ebb0835d934ae6bc0da3eb/mixcloud-0.0.2.tar.gz" } ], "0.0.3": [ { "comment_text": "", "digests": { "md5": "917ff82fc254616f493e9f473aec81d0", "sha256": "1f0f19bea440d3febd03ae027a8dfe789bab3ffa14d749f825d45d6b14992169" }, "downloads": -1, "filename": "mixcloud-0.0.3.tar.gz", "has_sig": true, "md5_digest": "917ff82fc254616f493e9f473aec81d0", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6324, "upload_time": "2015-03-15T16:56:41", "url": "https://files.pythonhosted.org/packages/13/ed/16849f99b771437ccd41cd4fc19b494ea5903e44c95528f1d145ffd94be5/mixcloud-0.0.3.tar.gz" } ], "0.4.0": [ { "comment_text": "", "digests": { "md5": "905e036e075181eaabee68559aca5653", "sha256": "797a7ac23187b033411d2a0897b4068af774eea93e92d18ac4f542f95af0d661" }, "downloads": -1, "filename": "mixcloud-0.4.0.tar.gz", "has_sig": true, "md5_digest": "905e036e075181eaabee68559aca5653", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7674, "upload_time": "2015-10-27T08:18:04", "url": "https://files.pythonhosted.org/packages/e3/9e/70aedb77e9b5d99b54dd569d0ba2357cb64909b20805f459f90d45c426c6/mixcloud-0.4.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "905e036e075181eaabee68559aca5653", "sha256": "797a7ac23187b033411d2a0897b4068af774eea93e92d18ac4f542f95af0d661" }, "downloads": -1, "filename": "mixcloud-0.4.0.tar.gz", "has_sig": true, "md5_digest": "905e036e075181eaabee68559aca5653", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7674, "upload_time": "2015-10-27T08:18:04", "url": "https://files.pythonhosted.org/packages/e3/9e/70aedb77e9b5d99b54dd569d0ba2357cb64909b20805f459f90d45c426c6/mixcloud-0.4.0.tar.gz" } ] }