Skip to content

Commit ead33cc

Browse files
committed
Merge pull request #1087 from dhermes/auth-discuss-clients
Add basic discussion of clients to auth doc.
2 parents ac13419 + 09aae55 commit ead33cc

File tree

1 file changed

+21
-2
lines changed

1 file changed

+21
-2
lines changed

docs/gcloud-auth.rst

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
Authentication
22
--------------
33

4-
Quick overview
5-
==============
4+
.. _Overview:
5+
6+
Overview
7+
========
68

79
* **If you're running in Compute Engine or App Engine**,
810
authentication should "just work".
@@ -24,3 +26,20 @@ Quick overview
2426
.. code-block:: bash
2527
2628
$ export GOOGLE_APPLICATION_CREDENTIALS="/path/to/keyfile.json"
29+
30+
Client-Provided Authentication
31+
==============================
32+
33+
Every package uses a :class:`Client <gcloud.client.Client>` as a base
34+
for interacting with an API. For example:
35+
36+
.. code-block:: python
37+
38+
from gcloud import datastore
39+
client = datastore.Client()
40+
41+
Passing no arguments at all will "just work" if you've following the
42+
instructions in the :ref:`Overview`. The credentials are inferred from your
43+
local environment by using Google `Application Default Credentials`_.
44+
45+
.. _Application Default Credentials: https://developers.google.com/identity/protocols/application-default-credentials

0 commit comments

Comments
 (0)