Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

API Core: Add client_options documentation. #8834

Merged
merged 3 commits into from
Jul 30, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions api_core/docs/client_options.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
Client Options
==========================

.. automodule:: google.api_core.client_options
:members:
:show-inheritance:
1 change: 1 addition & 0 deletions api_core/docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ Core
.. toctree::
auth
client_info
client_options
exceptions
futures
helpers
Expand Down
21 changes: 21 additions & 0 deletions api_core/google/api_core/client_options.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"})


"""


Expand Down