{ "info": { "author": "Vivek Seth", "author_email": "viveksethm@example.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 3 - Alpha", "License :: OSI Approved :: MIT License", "Programming Language :: Python :: 2.7" ], "description": "# Generic Oauth\n\n## Description\n\n`generic_oauth` makes it extremely simple to use any OAuth v2 API purely from the command line. With any of the provided implementations you can get an access token in just 2 lines of code.\n\nTypically browsers are a required component of the Oauth flow\u2014APIs use html pages to allow users to grant permisson to third party apps to make requests on their behalf. This makes it easy for web-apps to use oauth apis, but difficult and clunkly for command-line apps to use these services. \n\nWith `generic_oauth` you can synchronosly generate access_tokens for any oauth api with just a few lines of code. \n\nImplementations included: \n\n- Google\n- Github\n- Facebook\n- Spotify\n\n## Sample Usage\n\n```\nimport secrets\nimport requests\nfrom generic_oauth import SpotifyOAuth\n\n# Get a spotify access_token in just 2 lines. \no = SpotifyOAuth(secrets.client_id, secrets.client_secret, secrets.redirect_uri, secrets.scope_string)\naccess_data = o.get_access_code()\n\nheaders = {'Authorization': 'Bearer ' + access_data['access_token']}\nr = requests.get('https://api.spotify.com/v1/me', headers=headers)\nprint r.json()\n\n```\n\n## Documentation\n\n`OAuthWebFlowController` is an abstract class responsible for handling the bulk of the oauth 2.0 web flow. To implement a handler for an OAuth api not already included, you will need to make a subclass of this class and override the `authorization_url()` and `parse_temp_code()` methods.\n\n`OAuthWebFlowController` creates a temporarly local HTTP server to accept data sent to the `redirect_uri`. The default `redirect_uri` supported is http://localhost:5555. If you would like to use a different url, you will need to change the `port` param in the `__init__` method. For example if you use http://localhost:4321, you would set port=4321. \n\n## How to include in project\n\nTODO", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://github.com/vivekseth/generic_oauth", "keywords": "oauth api google facebook spotify github", "license": "MIT", "maintainer": null, "maintainer_email": null, "name": "generic_oauth", "package_url": "https://pypi.org/project/generic_oauth/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/generic_oauth/", "project_urls": { "Download": "UNKNOWN", "Homepage": "http://github.com/vivekseth/generic_oauth" }, "release_url": "https://pypi.org/project/generic_oauth/0.1/", "requires_dist": null, "requires_python": null, "summary": "generic_oauth makes it extremely simple to use any OAuth v2 API purely from the command line.", "version": "0.1" }, "last_serial": 2062435, "releases": { "0.1": [ { "comment_text": "", "digests": { "md5": "b6cecdc807fa20a9e49f1555b44c6c43", "sha256": "225ef5553708bbf5e1f8762173df408f46a0209f780c748ed2af554538a7193f" }, "downloads": -1, "filename": "generic_oauth-0.1.tar.gz", "has_sig": false, "md5_digest": "b6cecdc807fa20a9e49f1555b44c6c43", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3105, "upload_time": "2016-04-13T18:29:54", "url": "https://files.pythonhosted.org/packages/d1/26/dd0dfd01825bc5a2490042cdde3a7e3ccfbbd98afbeaa24edff1f1341f05/generic_oauth-0.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "b6cecdc807fa20a9e49f1555b44c6c43", "sha256": "225ef5553708bbf5e1f8762173df408f46a0209f780c748ed2af554538a7193f" }, "downloads": -1, "filename": "generic_oauth-0.1.tar.gz", "has_sig": false, "md5_digest": "b6cecdc807fa20a9e49f1555b44c6c43", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3105, "upload_time": "2016-04-13T18:29:54", "url": "https://files.pythonhosted.org/packages/d1/26/dd0dfd01825bc5a2490042cdde3a7e3ccfbbd98afbeaa24edff1f1341f05/generic_oauth-0.1.tar.gz" } ] }