Skip to content

Commit

Permalink
Show how to create credentials object (googleapis#3454)
Browse files Browse the repository at this point in the history
  • Loading branch information
ricardolui authored and landrito committed Aug 22, 2017
1 parent 3921e5d commit e2f516a
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions docs/google-cloud-auth.rst
Original file line number Diff line number Diff line change
Expand Up @@ -87,14 +87,19 @@ However, you may want to be explicit because
from different projects

In these situations, you can create an explicit
:class:`~google.auth.credentials.Credentials` object suited to your
environment. After creation, you can pass it directly to a
:class:`Client <google.cloud.client.Client>`:
:class:`~google.auth.credentials.Credentials` object suited to your environment.
After creation, you can pass it directly to a :class:`Client <google.cloud.client.Client>`:

.. code:: python
client = Client(credentials=credentials)
.. tip::
To create a credentials object, follow the `google-auth-guide`_.

.. _google-auth-guide: https://google-auth.readthedocs.io/en/latest/user-guide.html#service-account-private-key-files


Google App Engine Environment
-----------------------------

Expand Down

0 comments on commit e2f516a

Please sign in to comment.