Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(228)

Side by Side Diff: tools/telemetry/third_party/gsutil/third_party/gcs-oauth2-boto-plugin/README.md

Issue 1258583006: Add gsutil 4.13 to telemetry/third_party (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Undo all other changes so this just add gsutil to third_party Created 5 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 # gcs-oauth2-boto-plugin
2
3 gcs-oauth2-boto-plugin is a Python application whose purpose is to behave as
4 an auth plugin for the [boto] auth plugin framework for use with [OAuth 2.0]
5 credentials for the Google Cloud Platform. This plugin is compatible with
6 both [user accounts] and [service accounts], and its functionality is
7 essentially a wrapper around the oauth2client package of
8 [google-api-python-client] with the addition of automatically caching tokens
9 for the machine in a thread- and process-safe fashion.
10
11 For more information about how to use this plugin to access Google Cloud Storage
12 via boto in your application, see the [GCS documentation].
13
14 If you wish to use this plugin without using the PyPI install as instructed in
15 the documentation (e.g., for development), then you will need to manually
16 acquire the modules from the requirements.txt file.
17
18
19 When using this plugin, you must specify a client ID and secret. We offer the
20 following methods for providing this information; if multiple methods are used,
21 we will choose them in the following order:
22
23 1. .boto config, if not set
24 2. environment variables (OAUTH2_CLIENT_ID and OAUTH2_CLIENT_SECRET), if not set
25 3. CLIENT_ID and CLIENT_SECRET values set by SetFallbackClientIdAndSecret functi on.
26
27 Service accounts are supported via key files in either JSON or .p12 format.
28 The file is first interpreted as JSON, with .p12 format as a fallback.
29
30 The default locking mechanism used is threading.Lock. You can switch to using
31 another locking mechanism by calling SetLock. Example:
32
33 ```
34 SetLock(multiprocessing.Manager().Lock())
35 ```
36
37
38 Before submitting any code, please run the tests (e.g., by running the following
39 command from the root of this repository):
40
41 PYTHONPATH="." python -m gcs_oauth2_boto_plugin.test_oauth2_client
42
43 [boto]: https://github.com/boto/boto
44 [OAuth 2.0]: https://developers.google.com/accounts/docs/OAuth2Login
45 [user accounts]: https://developers.google.com/accounts/docs/OAuth2#installed
46 [service accounts]: https://developers.google.com/accounts/docs/OAuth2#serviceac count
47 [google-api-python-client]: https://code.google.com/p/google-api-python-client/w iki/OAuth2Client
48 [GCS documentation]: https://developers.google.com/storage/docs/gspythonlibrary
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698