{ "info": { "author": "Lucas Chapin", "author_email": "lucas@altschool.com", "bugtrack_url": null, "classifiers": [ "License :: OSI Approved :: MIT License", "Programming Language :: Python", "Programming Language :: Python :: Implementation :: CPython" ], "description": "# Dash Google Auth\n\nDash Google Auth is a simple library using Google OAuth to authenticate and\nview a [Dash](https://dash.plot.ly/) app.\n\nThis Library uses [Flask Dance](https://github.com/singingwolfboy/flask-dance)\nand a modified version of Plotly's own [dash auth](https://github.com/plotly/dash-auth)\nfor authentication.\n\n## Basic Use\n\nAuthentication can be added to your Dash application using the `GoogleOAuth`\nclass, i.e.\n\n```python\nfrom dash import Dash\nfrom flask import Flask\nfrom dash_google_auth import GoogleOAuth\n\nserver = Flask(__name__)\nserver.config.update({\n 'GOOGLE_OAUTH_CLIENT_ID': ...,\n 'GOOGLE_OAUTH_CLIENT_SECRET': ...,\n})\n\napp = Dash(__name__, server=server, url_base_pathname='/', auth='auth')\n\nauthorized_emails = [...]\nadditional_scopes = [...]\nauth = GoogleOAuth(app, authorized_emails, additional_scopes)\n\n# your Dash app here :)\n...\n```\n\n## Example\nSteps to try this out yourself:\n\n1. Install the `dash-google-auth` library using `pip`:\n\n ```bash\n $ pip install dash-google-auth\n ```\n\n2. Follow the [Flask Dance Guide](http://flask-dance.readthedocs.io/en/latest/quickstarts/google.html)\n to create an app on the google admin console\n\n3. Make a copy of [app.py](https://github.com/lucaschapin/dash-google-auth/blob/master/app.py)\n and set the variables (or set the corresponding environment variables):\n ```python\n server.config[\"GOOGLE_OAUTH_CLIENT_ID\"] = ...\n server.config[\"GOOGLE_OAUTH_CLIENT_SECRET\"] = ...\n ```\n with values from the Google OAuth 2 client you should have set up in step 1.\n If you've set these up properly, you can find them at\n [APIs & Services > Credentials](https://console.developers.google.com/apis/credentials)\n under the section **OAuth 2.0 client IDs**.\n\n4. Replace `authorized_emails` in `app.py` with whatever\n Google emails you want to grant access to your app. In production, I'd\n recommend getting these from a database instead.\n\n5. Run `python app.py` and open [localhost](http://localhost:8050/) in a\n browser window to try it out! If the app loads automatically without\n prompting a Google login, that means you're already authenticated -- try\n using an incognito window in this case if you want to see the login\n experience for a new user.\n\n", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/lucaschapin/dash-google-auth", "keywords": "", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "dash-google-auth", "package_url": "https://pypi.org/project/dash-google-auth/", "platform": "", "project_url": "https://pypi.org/project/dash-google-auth/", "project_urls": { "Homepage": "https://github.com/lucaschapin/dash-google-auth" }, "release_url": "https://pypi.org/project/dash-google-auth/0.1.2/", "requires_dist": [ "dash (>=0.26.5)", "dash-core-components (>=0.28.3)", "dash-html-components (>=0.12.0)", "Flask (>=0.12.4)", "Flask-Dance (>=0.14.0)", "six (>=1.11.0)" ], "requires_python": "", "summary": "Dash Google Auth", "version": "0.1.2" }, "last_serial": 4433823, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "10b5aafc658581e59368e692736a3bf9", "sha256": "238d9b45e606d3e1697728c6ade74b8dee6e01c909c8daa9b281700f1bccc79e" }, "downloads": -1, "filename": "dash_google_auth-0.1.0-py3-none-any.whl", "has_sig": false, "md5_digest": "10b5aafc658581e59368e692736a3bf9", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 5574, "upload_time": "2018-10-30T19:50:49", "url": "https://files.pythonhosted.org/packages/ce/58/46af3fb74deabab8435e0c8769b1c8f84feab8ea1df570a0d73cb262e3de/dash_google_auth-0.1.0-py3-none-any.whl" } ], "0.1.2": [ { "comment_text": "", "digests": { "md5": "2b08a227109547cba72bf1c94ce83ce8", "sha256": "ea74099e9d9102a3aee850330e9e208d7a5cf6f14159f9c11324b66f40338cfc" }, "downloads": -1, "filename": "dash_google_auth-0.1.2-py3-none-any.whl", "has_sig": false, "md5_digest": "2b08a227109547cba72bf1c94ce83ce8", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 4967, "upload_time": "2018-10-31T00:36:59", "url": "https://files.pythonhosted.org/packages/48/5c/b39371b5b7ee976463e91f6aef0ea719b903bed26eb3bba0f32b675bc166/dash_google_auth-0.1.2-py3-none-any.whl" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "2b08a227109547cba72bf1c94ce83ce8", "sha256": "ea74099e9d9102a3aee850330e9e208d7a5cf6f14159f9c11324b66f40338cfc" }, "downloads": -1, "filename": "dash_google_auth-0.1.2-py3-none-any.whl", "has_sig": false, "md5_digest": "2b08a227109547cba72bf1c94ce83ce8", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 4967, "upload_time": "2018-10-31T00:36:59", "url": "https://files.pythonhosted.org/packages/48/5c/b39371b5b7ee976463e91f6aef0ea719b903bed26eb3bba0f32b675bc166/dash_google_auth-0.1.2-py3-none-any.whl" } ] }