{ "info": { "author": "Google Inc.", "author_email": "ocervello@google.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 3 - Alpha", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Programming Language :: Python :: 2", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", "Topic :: Software Development :: Build Tools" ], "description": "# GSuite Exporter\n\nThis package handles exporting data from the GSuite Admin APIs to a destination.\n\nThe following GSuite Admin APIs are currently supported:\n\n- `reports_v1` - [Reports API](https://developers.google.com/admin-sdk/reports/v1/get-start/getting-started)\n - `admin` - [Admin activity reports](https://developers.google.com/admin-sdk/reports/v1/guides/manage-audit-admin.html)\n - `drive` - [Google Drive activity reports](https://developers.google.com/admin-sdk/reports/v1/guides/manage-audit-drive.html)\n - `login` - [Login activity reports](https://developers.google.com/admin-sdk/reports/v1/guides/manage-audit-login.html)\n - `mobile` - [Mobile activity reports](https://developers.google.com/admin-sdk/reports/v1/guides/manage-audit-mobile.html)\n - `token` - [Authorization Token activity reports](https://developers.google.com/admin-sdk/reports/v1/guides/manage-audit-tokens.html)\n\nThe following destinations are currently supported:\n- [Stackdriver Logging](https://cloud.google.com/logging/docs/)\n\n## Requirements\n* A GSuite Admin account\n* A service account with:\n * [GSuite domain-wide delegation](https://developers.google.com/admin-sdk/reports/v1/guides/delegation) enabled.\n * The IAM role `roles/iam.tokenCreator` granted to the service account on the project it was created in.\n* On the service account's project:\n * Enable the `Identity and Access Management (IAM) API`.\n* On the destination project:\n * Enable the `Admin Reports API`.\n\n### Collectors\nTo collect data from the Admin SDK APIs, you need to grant extra permissions to your service account:\n* Go to your [Admin Console](https://admin.google.com) and login with your GSuite administrator account\n* Navigate to `Security > Advanced Settings > Manage API client access`\n* Grant the following scopes (comma-separated) to your service account's `client_id`:\n - https://www.googleapis.com/auth/admin.reports.audit.readonly\n - https://www.googleapis.com/auth/iam\n\n### Exporters\n\n#### Stackdriver Logging\nTo use the Stackdriver Logging exporter, you need to grant extra IAM roles to your service account:\n* `roles/logging.viewer` on the destination project\n* `roles/logging.logWriter` on the destination project\n\n## Installation\n```sh\npip install gsuite-exporter\n```\n\n## Usage\n\nThe **GSuite Exporter** can be used either using the command-line interface or as a Python library.\n\n### Using the CLI\nAn example sync from the Admin Reports API to Stackdriver Logging for the 'login' application looks like:\n```sh\ngsuite-exporter\n --credentials-path='/path/to/service/account/credentials.json'\n --admin-user='@'\n --api='report_v1'\n --applications='login drive token'\n --project-id=''\n --exporter='stackdriver_exporter.StackdriverExporter'\n```\n\nThe `credentials_path` variable is optional and you can use [Application Default Credentials](https://cloud.google.com/docs/authentication/production#providing_credentials_to_your_application) instead.\n\n### Using as a library\n\nAn example sync from the Admin Reports API to Stackdriver Logging looks like:\n\n```python\nfrom gsuite_exporter.cli import sync_all\n\nsync_all(\n credentials_path=/path/to/service/account/credentials.json,\n admin_user='@',\n api='reports_v1',\n applications=['login', 'drive', 'token'],\n project_id='',\n exporter_class='stackdriver_exporter.StackdriverExporter'\n)\n```\n\nMore examples are available using the library functions under the [examples/](./examples/) directory.\n\n\n", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "", "keywords": "gsuite exporter stackdriver", "license": "", "maintainer": "", "maintainer_email": "", "name": "gsuite-exporter", "package_url": "https://pypi.org/project/gsuite-exporter/", "platform": "", "project_url": "https://pypi.org/project/gsuite-exporter/", "project_urls": null, "release_url": "https://pypi.org/project/gsuite-exporter/0.0.3/", "requires_dist": [ "google-api-python-client", "python-dateutil", "requests" ], "requires_python": ">=2.7", "summary": "GSuite Admin API Exporter", "version": "0.0.3" }, "last_serial": 5879422, "releases": { "0.0.2": [ { "comment_text": "", "digests": { "md5": "5ebacf2055ed531a8263fd044be97542", "sha256": "dcaf42174727a714f7969a2ca814d40ef628019d0e0b258c5e2cb5ef2a1944b3" }, "downloads": -1, "filename": "gsuite_exporter-0.0.2-py3-none-any.whl", "has_sig": false, "md5_digest": "5ebacf2055ed531a8263fd044be97542", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=2.7", "size": 13276, "upload_time": "2019-08-30T09:06:23", "url": "https://files.pythonhosted.org/packages/77/18/dc419853ed4516e238326c800193883563ef7675d69e5162cab38795c129/gsuite_exporter-0.0.2-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "bb7bd968ab41c0ef054dd17c3c46b3f6", "sha256": "da3c56f16884df8d157e8b40ee75bbe4150dc3fdb605e20d8cac8dddce5ff91a" }, "downloads": -1, "filename": "gsuite-exporter-0.0.2.tar.gz", "has_sig": false, "md5_digest": "bb7bd968ab41c0ef054dd17c3c46b3f6", "packagetype": "sdist", "python_version": "source", "requires_python": ">=2.7", "size": 8826, "upload_time": "2019-08-30T09:06:25", "url": "https://files.pythonhosted.org/packages/46/6d/20c321cc8f2c8b79cff0bf4a7a790693b0c50a1474da4efaff46e216a900/gsuite-exporter-0.0.2.tar.gz" } ], "0.0.3": [ { "comment_text": "", "digests": { "md5": "7b70137e4fde2d386d1df6a1538afdd3", "sha256": "d961e10d77bfab83127500a8b6a99fa6299c8acdbe4ddffbddee9a1253ac9c5d" }, "downloads": -1, "filename": "gsuite_exporter-0.0.3-py3-none-any.whl", "has_sig": false, "md5_digest": "7b70137e4fde2d386d1df6a1538afdd3", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=2.7", "size": 13275, "upload_time": "2019-09-24T12:28:35", "url": "https://files.pythonhosted.org/packages/92/53/e8b732d4b8b2a783443b6caa89ac46766455ccd4a8d9901ee5f4b2740c7b/gsuite_exporter-0.0.3-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "50c9b034269c024a2da3fd0c56507e95", "sha256": "7255205ee8f202069f39acb8c7ba70baacf1d9b62e1f23732a9e3d60fe16186f" }, "downloads": -1, "filename": "gsuite-exporter-0.0.3.tar.gz", "has_sig": false, "md5_digest": "50c9b034269c024a2da3fd0c56507e95", "packagetype": "sdist", "python_version": "source", "requires_python": ">=2.7", "size": 8811, "upload_time": "2019-09-24T12:28:37", "url": "https://files.pythonhosted.org/packages/d5/fa/63b732016d5bad0914870346ca392c59fc3b712356c7a20404286285afe4/gsuite-exporter-0.0.3.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "7b70137e4fde2d386d1df6a1538afdd3", "sha256": "d961e10d77bfab83127500a8b6a99fa6299c8acdbe4ddffbddee9a1253ac9c5d" }, "downloads": -1, "filename": "gsuite_exporter-0.0.3-py3-none-any.whl", "has_sig": false, "md5_digest": "7b70137e4fde2d386d1df6a1538afdd3", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=2.7", "size": 13275, "upload_time": "2019-09-24T12:28:35", "url": "https://files.pythonhosted.org/packages/92/53/e8b732d4b8b2a783443b6caa89ac46766455ccd4a8d9901ee5f4b2740c7b/gsuite_exporter-0.0.3-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "50c9b034269c024a2da3fd0c56507e95", "sha256": "7255205ee8f202069f39acb8c7ba70baacf1d9b62e1f23732a9e3d60fe16186f" }, "downloads": -1, "filename": "gsuite-exporter-0.0.3.tar.gz", "has_sig": false, "md5_digest": "50c9b034269c024a2da3fd0c56507e95", "packagetype": "sdist", "python_version": "source", "requires_python": ">=2.7", "size": 8811, "upload_time": "2019-09-24T12:28:37", "url": "https://files.pythonhosted.org/packages/d5/fa/63b732016d5bad0914870346ca392c59fc3b712356c7a20404286285afe4/gsuite-exporter-0.0.3.tar.gz" } ] }