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

doc(automl): add example for creating a TablesClient for EU in docstring #9825

Merged
merged 1 commit into from
Jan 8, 2020
Merged
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
13 changes: 12 additions & 1 deletion automl/google/cloud/automl_v1beta1/tables/tables_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ def __init__(
):
"""Constructor.

Example:
Example for US region:
>>> from google.cloud import automl_v1beta1
>>>
>>> from google.oauth2 import service_account
Expand All @@ -60,6 +60,17 @@ def __init__(
... project='my-project', region='us-central1')
...

Example for EU region:
>>> from google.cloud import automl_v1beta1
>>>
>>> from google.oauth2 import service_account
>>>
>>> client_options = {'api_endpoint': 'eu-automl.googleapis.com:443'}
>>> client = automl_v1beta1.TablesClient(
... credentials=service_account.Credentials.from_service_account_file('~/.gcp/account.json'),
... project='my-project', region='eu', client_options=client_options)
...

Args:
project (Optional[str]): The project ID of the GCP project all
future calls will default to. Most methods take `project` as an
Expand Down