aboutsummaryrefslogtreecommitdiff
path: root/google
diff options
context:
space:
mode:
authorBu Sun Kim <8822365+busunkim96@users.noreply.github.com>2019-07-30 13:36:42 -0700
committerGitHub <noreply@github.com>2019-07-30 13:36:42 -0700
commitf82bd52ff4ddcd1413a03cbd6ffeda5bea6c9b9f (patch)
tree5b45515d53e90c0d5df74cc94e2e1f3ae1d2c442 /google
parentd9f63bfa71f4b78f5ade7a19604f50129580a4aa (diff)
downloadpython-api-core-f82bd52ff4ddcd1413a03cbd6ffeda5bea6c9b9f.tar.gz
API Core: Add client_options documentation. (#8834)
Diffstat (limited to 'google')
-rw-r--r--google/api_core/client_options.py21
1 files changed, 21 insertions, 0 deletions
diff --git a/google/api_core/client_options.py b/google/api_core/client_options.py
index 580aba9..1144d2f 100644
--- a/google/api_core/client_options.py
+++ b/google/api_core/client_options.py
@@ -16,6 +16,27 @@
Client options provide a consistent interface for user options to be defined
across clients.
+
+You can pass a client options object to a client.
+
+.. code-block:: python
+
+ from google.api_core.client_options import ClientOptions
+ from google.cloud.vision_v1 import ImageAnnotatorClient
+
+ options = ClientOptions(api_endpoint="foo.googleapis.com")
+
+ client = ImageAnnotatorClient(client_options=options)
+
+You can also pass a dictionary.
+
+.. code-block:: python
+
+ from google.cloud.vision_v1 import ImageAnnotatorClient
+
+ client = ImageAnnotatorClient(client_options={"api_endpoint": "foo.googleapis.com"})
+
+
"""