{ "info": { "author": "Vi Engineering", "author_email": "voiceai-eng@dialpad.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7", "Topic :: Internet" ], "description": "Asyncio Python Client for Google Cloud Auth\n===========================================\n\nThis is a shared codebase for ``gcloud-rest-auth`` and ``gcloud-rest-auth``. If\nyou are using the RESTful version, please ignore any usages of ``async`` and\n``await``.\n\nThis library implements a ``IamClient`` class, which can be used to interact\nwith GCP public keys and URL sign blobs.\n\nIt additionally implements a ``Token`` class, which is used for authorizing\nagainst Google Cloud. The other ``gcloud-rest-*`` package components accept a\n``Token`` instance as an argument; you can define a single token for all of\nthese components or define one for each. Each component corresponds to a given\nGoogle Cloud service and each service requires \"`scopes`_\".\n\n|aio-pypi| |aio-pythons| |rest-pypi| |rest-pythons|\n\nInstallation\n------------\n\n.. code-block:: console\n\n $ pip install --upgrade gcloud-rest-auth\n # or\n $ pip install --upgrade gcloud-rest-auth\n\nUsage\n-----\n\n.. code-block:: python\n\n from gcloud.rest.auth import IamClient\n\n client = IamClient()\n pubkeys = await client.list_public_keys()\n\n\n from gcloud.rest.auth import Token\n\n token = Token()\n print(token.get())\n\nAdditionally, the ``Token`` constructor accepts the following optional\narguments:\n\n* ``service_file``: path to a `service account`_, authorized user file, or any\n other application credentials. Alternatively, you can pass a file-like\n object, like an ``io.StringIO`` instance, in case your credentials are not\n stored in a file but in memory. If omitted, will attempt to find one on your\n path or fallback to generating a token from GCE metadata.\n* ``session``: an ``aiohttp.ClientSession`` instance to be used for all\n requests. If omitted, a default session will be created.\n* ``scopes``: an optional list of GCP `scopes`_ for which to generate our\n token. Only valid (and required!) for `service account`_ authentication.\n\nCLI\n~~~\n\nThis project can also be used to help you manually authenticate to test GCP\nroutes, eg. we can list our project's uptime checks with a tool such as\n``curl``:\n\n.. code-block:: console\n\n # using default application credentials\n curl \\\n -H \"Authorization: Bearer $(python3 -c 'from gcloud.rest.auth import Token; print(Token().get())')\" \\\n \"https://monitoring.googleapis.com/v3/projects/PROJECT_ID/uptimeCheckConfigs\"\n\n # using a service account (make sure to provide a scope!)\n export GOOGLE_APPLICATION_CREDENTIALS=/path/to/service.json\n curl \\\n -H \"Authorization: Bearer $(python3 -c 'from gcloud.rest.auth import Token; print(Token(scopes=[\"'\"https://www.googleapis.com/auth/cloud-platform\"'\"]).get())')\" \\\n \"https://monitoring.googleapis.com/v3/projects/PROJECT_ID/uptimeCheckConfigs\"\n\n # using legacy account credentials\n export GOOGLE_APPLICATION_CREDENTIALS=~/.config/gcloud/legacy_credentials/EMAIL@DOMAIN.TLD/adc.json\n curl \\\n -H \"Authorization: Bearer $(python3 -c 'from gcloud.rest.auth import Token; print(Token().get())')\" \\\n \"https://monitoring.googleapis.com/v3/projects/PROJECT_ID/uptimeCheckConfigs\"\n\nContributing\n------------\n\nPlease see our `contributing guide`_.\n\n.. _contributing guide: https://github.com/talkiq/gcloud-rest/blob/master/.github/CONTRIBUTING.rst\n.. _scopes: https://developers.google.com/identity/protocols/googlescopes\n.. _service account: https://console.cloud.google.com/iam-admin/serviceaccounts\n.. _smoke test: https://github.com/talkiq/gcloud-rest/blob/master/auth/tests/integration/smoke_test.py\n\n.. |aio-pypi| image:: https://img.shields.io/pypi/v/gcloud-rest-auth.svg?style=flat-square&label=pypi (aio)\n :alt: Latest PyPI Version (gcloud-rest-auth)\n :target: https://pypi.org/project/gcloud-rest-auth/\n\n.. |aio-pythons| image:: https://img.shields.io/pypi/pyversions/gcloud-rest-auth.svg?style=flat-square&label=python (aio)\n :alt: Python Version Support (gcloud-rest-auth)\n :target: https://pypi.org/project/gcloud-rest-auth/\n\n.. |rest-pypi| image:: https://img.shields.io/pypi/v/gcloud-rest-auth.svg?style=flat-square&label=pypi (rest)\n :alt: Latest PyPI Version (gcloud-rest-auth)\n :target: https://pypi.org/project/gcloud-rest-auth/\n\n.. |rest-pythons| image:: https://img.shields.io/pypi/pyversions/gcloud-rest-auth.svg?style=flat-square&label=python (rest)\n :alt: Python Version Support (gcloud-rest-auth)\n :target: https://pypi.org/project/gcloud-rest-auth/\n\n\n", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/talkiq/gcloud-rest", "keywords": "", "license": "MIT License", "maintainer": "", "maintainer_email": "", "name": "gcloud-rest-auth", "package_url": "https://pypi.org/project/gcloud-rest-auth/", "platform": "Posix; MacOS X; Windows", "project_url": "https://pypi.org/project/gcloud-rest-auth/", "project_urls": { "Homepage": "https://github.com/talkiq/gcloud-rest" }, "release_url": "https://pypi.org/project/gcloud-rest-auth/3.0.0/", "requires_dist": [ "backoff (<2.0.0,>=1.0.0)", "cryptography (<3.0.0,>=2.0.0)", "future (<0.18.0,>=0.17.0)", "pyjwt (<2.0.0,>=1.5.3)", "requests (<2.23.0,>=2.20.0)", "six (<1.13.0,>=1.11.0)", "typing (==3.7.4.1)" ], "requires_python": ">= 2.7", "summary": "Python Client for Google Cloud Auth", "version": "3.0.0" }, "last_serial": 5974391, "releases": { "3.0.0": [ { "comment_text": "", "digests": { "md5": "a299050bd2fc1c4d2ef514970e5c773d", "sha256": "1703b872e8e99b59682ad818529d37454ca0fe62f6443ca2d8b873accf7503a0" }, "downloads": -1, "filename": "gcloud_rest_auth-3.0.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "a299050bd2fc1c4d2ef514970e5c773d", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": ">= 2.7", "size": 15321, "upload_time": "2019-10-15T01:57:14", "url": "https://files.pythonhosted.org/packages/dd/4b/a6c25b264b184d109c23f0a01e1b1a73d7fca06399783329d1f207b222b0/gcloud_rest_auth-3.0.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "3bf6492a92c7dc147ebb7aceac5f4e63", "sha256": "aefeecf047cfa27e583079b4b7fd0b61f8b422457faf7a447301f5183cf32e43" }, "downloads": -1, "filename": "gcloud-rest-auth-3.0.0.tar.gz", "has_sig": false, "md5_digest": "3bf6492a92c7dc147ebb7aceac5f4e63", "packagetype": "sdist", "python_version": "source", "requires_python": ">= 2.7", "size": 12438, "upload_time": "2019-10-15T01:57:18", "url": "https://files.pythonhosted.org/packages/50/4e/3bb95363ecab40089f8afef1e38f8f3f027cf44ece5540f6208a90e0b43e/gcloud-rest-auth-3.0.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "a299050bd2fc1c4d2ef514970e5c773d", "sha256": "1703b872e8e99b59682ad818529d37454ca0fe62f6443ca2d8b873accf7503a0" }, "downloads": -1, "filename": "gcloud_rest_auth-3.0.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "a299050bd2fc1c4d2ef514970e5c773d", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": ">= 2.7", "size": 15321, "upload_time": "2019-10-15T01:57:14", "url": "https://files.pythonhosted.org/packages/dd/4b/a6c25b264b184d109c23f0a01e1b1a73d7fca06399783329d1f207b222b0/gcloud_rest_auth-3.0.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "3bf6492a92c7dc147ebb7aceac5f4e63", "sha256": "aefeecf047cfa27e583079b4b7fd0b61f8b422457faf7a447301f5183cf32e43" }, "downloads": -1, "filename": "gcloud-rest-auth-3.0.0.tar.gz", "has_sig": false, "md5_digest": "3bf6492a92c7dc147ebb7aceac5f4e63", "packagetype": "sdist", "python_version": "source", "requires_python": ">= 2.7", "size": 12438, "upload_time": "2019-10-15T01:57:18", "url": "https://files.pythonhosted.org/packages/50/4e/3bb95363ecab40089f8afef1e38f8f3f027cf44ece5540f6208a90e0b43e/gcloud-rest-auth-3.0.0.tar.gz" } ] }