{ "info": { "author": "Matti Savolainen", "author_email": "matti@applifier.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Intended Audience :: Developers", "License :: OSI Approved :: BSD License", "Operating System :: OS Independent", "Programming Language :: Python", "Topic :: Internet", "Topic :: Software Development :: Libraries :: Python Modules" ], "description": "=================\neveryplay-python\n=================\n\nA friendly wrapper around the `Everyplay API`_ based on the `SoundCloud python wrapper`_.\n\n.. _Everyplay API: https://developers.everyplay.com/\n.. _SoundCloud python wrapper: https://github.com/soundcloud/soundcloud-python/\n\nInstallation\n------------\n\nTo install everyplay-python, simply: ::\n\n pip install everyplay\n\nOr if you're not hip to the pip: ::\n\n easy_install everyplay\n\nBasic Use\n---------\n\nTo use everyplay-python, you must first create a `Client` instance,\npassing at a minimum the client id you obtained when you `registered\nyour app`_: ::\n\n import everyplay\n\n client = everyplay.Client(client_id=YOUR_CLIENT_ID)\n\nThe client instance can then be used to fetch or modify resources: ::\n\n videos = client.get('/videos', order='popularity', limit=10)\n for video in videos:\n print video.title\n app = client.get('/games/1')\n print app.permalink_url\n\n.. _registered your app: https://developers.everyplay.com/\n\nAuthentication\n--------------\n\nAll `OAuth2 authorization flows`_ supported by the Everyplay API are\navailable in everyplay-python. If you only need read-only access to\npublic resources, simply provide a client id when creating a `Client`\ninstance: ::\n\n import everyplay\n\n client = everyplay.Client(client_id=YOUR_CLIENT_ID)\n video = client.get('/videos/7000')\n print video.title\n\nIf however, you need to access private resources or modify a resource,\nyou will need to have a user delegate access to your application. To do\nthis, you can use one of the following OAuth2 authorization flows.\n\n**Authorization Code Flow**\n\nThe `Authorization Code Flow`_ involves redirecting the user to everyplay.com\nwhere they will log in and grant access to your application: ::\n\n import everyplay\n\n client = everyplay.Client(\n client_id=YOUR_CLIENT_ID,\n client_secret=YOUR_CLIENT_SECRET,\n redirect_uri='http://yourapp.com/callback'\n )\n redirect(client.authorize_url())\n\nNote that `redirect_uri` must match the value you provided when you\nregistered your application. After granting access, the user will be\nredirected to this uri, at which point your application can exchange\nthe returned code for an access token: ::\n\n access_token, expires, scope, refresh_token = client.exchange_token(\n code=request.args.get('code'))\n render_text(\"Hi There, %s\" % client.get('/me').username)\n\n\n**User Credentials Flow**\n\nThe `User Credentials Flow`_ allows you to exchange a username and\npassword for an access token. Be cautious about using this flow, it's\nnot very kind to ask your users for their password, but may be\nnecessary in some use cases. The credentials flow is currently only allowed for\ngamne profile users: ::\n\n import everyplay\n\n client = everyplay.Client(\n client_id=YOUR_CLIENT_ID,\n client_secret=YOUR_CLIENT_SECRET,\n username='profile_user_name',\n password='profile_password'\n )\n print client.get('/me').username\n\n.. _`OAuth2 authorization flows`: http://developers.everyplay.com/\n.. _`Authorization Code Flow`: http://developers.everyplay.com/\n.. _`User Credentials Flow`: http://developers.everyplay.com/\n\nExamples\n--------\n\nResolve a video and print its id: ::\n\n import everyplay\n\n client = everyplay.Client(client_id=YOUR_CLIENT_ID)\n\n video = client.get('/resolve', url='http://everyplay.com/nomon/first-video')\n\n print video.id\n\n\nStart following a user: ::\n\n import everyplay\n\n client = everyplay.Client(access_token=\"a valid access token\")\n user_id_to_follow = 123\n client.put('/me/followings/%d' % user_id_to_follow)\n\n\nProxy Support\n-------------\n\nIf you're behind a proxy, you can specify it when creating a client: ::\n\n import everyplay\n\n proxies = {\n 'http': 'example.com:8000'\n }\n client = everyplay.Client(access_token=\"a valid access token\",\n proxies=proxies)\n\nThe proxies kwarg is a dictionary with protocols as keys and host:port as values.\n\nRunning Tests\n-------------\n\nTo run the tests, run: ::\n\n $ pip install -r requirements.txt\n $ nosetests --with-doctest\n ..................\n\nSuccess!\n\nContributing\n------------\n\nContributions are awesome. You are most welcome to `submit issues`_,\nor `fork the repository`_.\n\neveryplay-python is published under a `BSD License`_.\n\n.. _`submit issues`: https://github.com/Everyplay/everyplay-python/issues\n.. _`fork the repository`: https://github.com/Everyplay/everyplay-python\n.. _`BSD License`: https://github.com/Everyplay/everyplay-python/blob/master/LICENSE\n", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/Everyplay/everyplay-python", "keywords": null, "license": "BSD", "maintainer": null, "maintainer_email": null, "name": "everyplay", "package_url": "https://pypi.org/project/everyplay/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/everyplay/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://github.com/Everyplay/everyplay-python" }, "release_url": "https://pypi.org/project/everyplay/0.3.6/", "requires_dist": null, "requires_python": null, "summary": "A friendly wrapper library for the Everyplay API", "version": "0.3.6" }, "last_serial": 791767, "releases": { "0.3.6": [ { "comment_text": "", "digests": { "md5": "9247bb3ff33012249c0b9a95466204e2", "sha256": "931d7954fed9924863991d23c6eba60f062ca5ba6b343124f380707cb85d2c2c" }, "downloads": -1, "filename": "everyplay-0.3.6.tar.gz", "has_sig": false, "md5_digest": "9247bb3ff33012249c0b9a95466204e2", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7316, "upload_time": "2013-01-07T13:13:10", "url": "https://files.pythonhosted.org/packages/93/30/727357c55ec46c9b3658a8e76d964ab9769c3f23de987d5ca8cbaa200e97/everyplay-0.3.6.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "9247bb3ff33012249c0b9a95466204e2", "sha256": "931d7954fed9924863991d23c6eba60f062ca5ba6b343124f380707cb85d2c2c" }, "downloads": -1, "filename": "everyplay-0.3.6.tar.gz", "has_sig": false, "md5_digest": "9247bb3ff33012249c0b9a95466204e2", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7316, "upload_time": "2013-01-07T13:13:10", "url": "https://files.pythonhosted.org/packages/93/30/727357c55ec46c9b3658a8e76d964ab9769c3f23de987d5ca8cbaa200e97/everyplay-0.3.6.tar.gz" } ] }