{ "info": { "author": "Paul Woelfel", "author_email": "github@frig.at", "bugtrack_url": null, "classifiers": [ "Development Status :: 3 - Alpha", "Intended Audience :: Developers", "License :: OSI Approved :: GNU General Public License v3 (GPLv3)", "Programming Language :: Python :: 2", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.3", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5", "Topic :: Software Development :: Libraries" ], "description": "==========================================\ngoogle-api-helper Python Google API helper\n==========================================\n\ngoogle-api-helper helps streamline access to google apis including authentication using oauth2 and factory methods to create an API service. I.e. creating a compute API service is not to bad but still needs some code:\n\n.. code-block:: python\n\n import googleapiclient.discovery\n from oauth2client.service_account import ServiceAccountCredentials\n\n credentials = ServiceAccountCredentials.from_json_keyfile_name(\"service_account.json\", [\"https://www.googleapis.com/auth/compute\"])\n compute = googleapiclient.discovery.build('compute', 'v1', credentials=credentials)\n\nWith google-api-helper that's a oneliner:\n\n.. code-block:: python\n\n from googleapi import GoogleApi\n compute = GoogleApi.compute().with_service_account_file(\"service_account.json\")\n\nalso using the OAUTH2 flow is simple\n\n.. code-block:: python\n\n from googleapi import GoogleApi\n compute = GoogleApi.compute().with_oauth2_flow(\"client_secret.json\")\n\npython-google-api-client also got retries for server errors included, but not for rate limiting. Therefore every API call you make needs to implement an exponential backoff. This is automatically done by using google-api-helper.\n\n.. code-block:: python\n\n from googleapi import GoogleApi\n compute = GoogleApi.compute().with_oauth2_flow(\"client_secret.json\")\n # directly using the api service without retries\n compute.service.instances().list(project=\"my-gcp-project\", zone=\"europe-west1-d\").execute()\n # wrapper including retries for rate limiting and server side errors \n compute.instances().list(project=\"my-gcp-project\", zone=\"europe-west1-d\").execute()\n\nInstallation\n------------\n\nAdd `google-api-helper` to your requirements.txt or your module requirements or install via pip:\n\n.. code-block:: bash\n\n pip install google-api-helper\n\n\nQuickstart\n----------\n\nImport GoogleApi in your python code\n\n.. code-block:: python\n\n from googleapi import GoogleApi\n\nCreate the api from a factory method or specify it by yourself:\n\n.. code-block:: python\n\n compute = GoogleApi.compute()\n drive = GoogleApi.drive()\n gmail = GoogleApi(\"gmail\", \"v1\", [\"https://mail.google.com/\"])\n\nAuthenticate with oauth2\n\n.. code-block:: python\n\n # use Compute Engine or App Engine default credentials\n compute.with_application_credentials()\n # use a service account to access a users drive\n drive.with_service_account_file(\"service_account.json\", \"test@example.com\")\n # or run a oauth2 flow to ask the user for credentials\n gmail.with_oauth2_flow(\"client_secret.json\")\n\n\nAnd call the api\n\n.. code-block:: python\n\n instances = compute.instances().list(project=\"project-id\", zone=\"europe-west1-d\").execute()\n drive_files = drive.files().list(q=\"name='test'\").execute()\n messages = gmail.users().messages().list(userId=\"me\").execute()\n\n\nBuilding and publishing\n-----------------------\n\n.. code-block:: bash\n\n python setup.py bdist_wheel --universal\n python -m twine upload dist/*\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/r00tat/google-api-helper", "keywords": "google api python", "license": "GNU GPL v3", "maintainer": "", "maintainer_email": "", "name": "google-api-helper", "package_url": "https://pypi.org/project/google-api-helper/", "platform": "", "project_url": "https://pypi.org/project/google-api-helper/", "project_urls": { "Homepage": "https://github.com/r00tat/google-api-helper" }, "release_url": "https://pypi.org/project/google-api-helper/0.3.1/", "requires_dist": [ "google-api-python-client", "google-auth", "google-auth-oauthlib" ], "requires_python": "", "summary": "Python helper class to streamlime interaction with Google APIs. Based on python-google-api-client.", "version": "0.3.1" }, "last_serial": 5175940, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "4defac954f86e249953e0798fec17f93", "sha256": "b0833434433195aa171d006cf1585dfd273baa79edf85b673faf18097a60803c" }, "downloads": -1, "filename": "google_api_helper-0.1.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "4defac954f86e249953e0798fec17f93", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 6925, "upload_time": "2017-05-29T20:05:21", "url": "https://files.pythonhosted.org/packages/14/0d/1f146f7d8473996a2f806537077816ea8aa29a87a2f6a48fe3b6530d1f20/google_api_helper-0.1.0-py2.py3-none-any.whl" } ], "0.1.1": [ { "comment_text": "", "digests": { "md5": "adc6606e411362ad7463d06e56f5d276", "sha256": "aae6655b0c645c7c0e08bf7c75dda01941a6cd7f07b3621860c46ef0362dd142" }, "downloads": -1, "filename": "google_api_helper-0.1.1-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "adc6606e411362ad7463d06e56f5d276", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 8818, "upload_time": "2017-05-30T13:13:24", "url": "https://files.pythonhosted.org/packages/e6/fb/dc1f95fc2637c07c7fa5c7f152693f7fdb090144e065ba65e833d334ff24/google_api_helper-0.1.1-py2.py3-none-any.whl" } ], "0.1.2": [ { "comment_text": "", "digests": { "md5": "df46fd81ba2eea200f768cd70ae159b8", "sha256": "67d4b8a9fcd6a6acd8815da2d6f0676bb5ea8430dd8e972dbc23d87bd8e60d95" }, "downloads": -1, "filename": "google_api_helper-0.1.2-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "df46fd81ba2eea200f768cd70ae159b8", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 8830, "upload_time": "2017-05-30T13:22:44", "url": "https://files.pythonhosted.org/packages/57/9d/fa90bac5065a85ef171f4f22a78402504ede0ba7c5872dd4cadb7b7cc32b/google_api_helper-0.1.2-py2.py3-none-any.whl" } ], "0.1.3": [ { "comment_text": "", "digests": { "md5": "fec4d8f4a1d055537ff16f5cd343257d", "sha256": "9d0a7d70e11f3bc539ac8bea91e4c36fbc3a2bb3b5de806d804254815a22f599" }, "downloads": -1, "filename": "google_api_helper-0.1.3-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "fec4d8f4a1d055537ff16f5cd343257d", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 8826, "upload_time": "2017-05-30T13:39:20", "url": "https://files.pythonhosted.org/packages/ec/26/d18f53ebde03e723e75f7f0213c0ade0a65fc437f35f8b03f9971ea33165/google_api_helper-0.1.3-py2.py3-none-any.whl" } ], "0.2.0": [ { "comment_text": "", "digests": { "md5": "baeac3e42fe4b3ccd993624156ee1cc0", "sha256": "03c545c0375287be62faeeb56f4d39a7080dc7ab5a8c3454c9a5660ddf21dc12" }, "downloads": -1, "filename": "google_api_helper-0.2.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "baeac3e42fe4b3ccd993624156ee1cc0", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 9455, "upload_time": "2017-05-31T11:02:32", "url": "https://files.pythonhosted.org/packages/1c/9d/7e8610d65a0901735cc0ee0a95399d51deedf71f8f966c0a7a62be47350f/google_api_helper-0.2.0-py2.py3-none-any.whl" } ], "0.2.1": [ { "comment_text": "", "digests": { "md5": "0c39b2cb27a16a9cbbda69f5652e1618", "sha256": "e52f7021e86dd55f70e31b4bcdf65928071442578c231b27f442df08c26aae4a" }, "downloads": -1, "filename": "google_api_helper-0.2.1-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "0c39b2cb27a16a9cbbda69f5652e1618", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 9522, "upload_time": "2017-05-31T14:58:46", "url": "https://files.pythonhosted.org/packages/50/86/a81d659b95e5c4b9622b17d3e7691fd7aded019fb18f2a08d5a31fc4fd8c/google_api_helper-0.2.1-py2.py3-none-any.whl" } ], "0.2.2": [ { "comment_text": "", "digests": { "md5": "cad3777af65eec989479bd72c00693b6", "sha256": "17529d47d2a0a46151de17aaae67631b2843dc6bcb00f2fedd233d507d2530cb" }, "downloads": -1, "filename": "google_api_helper-0.2.2-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "cad3777af65eec989479bd72c00693b6", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 9487, "upload_time": "2017-07-06T20:43:30", "url": "https://files.pythonhosted.org/packages/b3/03/34f1c0770dbc1939b57e1544598dbbca2544ad273c095981009aec79f628/google_api_helper-0.2.2-py2.py3-none-any.whl" } ], "0.3.0": [ { "comment_text": "", "digests": { "md5": "9c35281f2cb6ec1924a3c49650425ab3", "sha256": "c4adbb7e30763d1ee94db843bdb0c7148699dc7e1faf24a40481e7c0ad1fbffd" }, "downloads": -1, "filename": "google_api_helper-0.3.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "9c35281f2cb6ec1924a3c49650425ab3", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 9331, "upload_time": "2018-07-24T16:49:06", "url": "https://files.pythonhosted.org/packages/a7/93/9ef7d4fd98e2717ddd06bda743fad46ff4a3b200c71a463829734849d356/google_api_helper-0.3.0-py2.py3-none-any.whl" } ], "0.3.1": [ { "comment_text": "", "digests": { "md5": "c7dd94e12d33503d8d2831e270994380", "sha256": "7a961f5274f848403b95ccd4064ad377581f3eeffa94b816602aadbdbb71f520" }, "downloads": -1, "filename": "google_api_helper-0.3.1-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "c7dd94e12d33503d8d2831e270994380", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 19594, "upload_time": "2019-04-23T08:04:52", "url": "https://files.pythonhosted.org/packages/3b/cc/17a3bf92d9158e8e59c98f4ccd8c2b25e96ceebbebb7e5e9abf2e8101620/google_api_helper-0.3.1-py2.py3-none-any.whl" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "c7dd94e12d33503d8d2831e270994380", "sha256": "7a961f5274f848403b95ccd4064ad377581f3eeffa94b816602aadbdbb71f520" }, "downloads": -1, "filename": "google_api_helper-0.3.1-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "c7dd94e12d33503d8d2831e270994380", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 19594, "upload_time": "2019-04-23T08:04:52", "url": "https://files.pythonhosted.org/packages/3b/cc/17a3bf92d9158e8e59c98f4ccd8c2b25e96ceebbebb7e5e9abf2e8101620/google_api_helper-0.3.1-py2.py3-none-any.whl" } ] }