|
3 | 3 | Getting Started |
4 | 4 | =============== |
5 | 5 |
|
6 | | -To get started using the Python Client API requires three steps. |
| 6 | +To get started using the Python Client API requires four steps. |
7 | 7 |
|
8 | | -- Instal the API using :code:`pip` |
9 | | -- Create an API key on `Google Cloud Platform <https://cloud.google.com/>`_ (GCP) |
10 | | -- Enable the API key with the Python Client API |
| 8 | +- Install the API using :code:`pip` |
| 9 | +- Create an API key on `Google Cloud Platform <https://cloud.google.com/>`_ (GCP) |
| 10 | +- Enable the *Data Commons API* on GCP. Note that this is separate from the |
| 11 | + *Python Client API*. |
| 12 | +- Provide the API key to the Python Client API and begin developing. |
11 | 13 |
|
12 | 14 | Installing the Python Client API |
13 | 15 | -------------------------------- |
@@ -44,11 +46,25 @@ Follow these steps to create your own key. |
44 | 46 | .. _`GCP Project`: https://console.developers.google.com/projectcreate |
45 | 47 | .. _`enabling billing`: https://cloud.google.com/billing/docs/how-to/modify-project#enable_billing_for_a_project |
46 | 48 |
|
| 49 | +Enable the Data Commons API |
| 50 | +--------------------------- |
| 51 | + |
| 52 | +Additionally, you will need to enable the *Data Commons API* on GCP which is |
| 53 | +separate from the *Python Client API*. This service enables the Python Client |
| 54 | +API to call our REST service and access data in our knowledge graph. To enable |
| 55 | +the API, do the following. |
| 56 | + |
| 57 | +1. Navigate to the `Data Commons API`_ in the Google APIs Console. |
| 58 | +2. Click the :code:`Enable` button and wait for the process to complete. |
| 59 | + |
| 60 | +.. _`Data Commons API`: https://console.developers.google.com/apis/api/api.datacommons.org/overview?pli=1 |
| 61 | + |
47 | 62 | Using the Python Client API |
48 | 63 | --------------------------- |
49 | 64 |
|
50 | | -Once you have the API key, you can get started using the Data Commons Python |
51 | | -Client API. There are two ways to enable your key in the API package. |
| 65 | +With the API key created and Data Commons API activated, we can now get started |
| 66 | +using the Data Commons Python Client API. There are two ways to provide your key |
| 67 | +to the Python Client API package. |
52 | 68 |
|
53 | 69 | 1. You can set the API key by calling :py:func:`datacommons.utils.set_api_key`. |
54 | 70 | Start by importing :code:`datacommons`, then set the API key like so. |
@@ -79,6 +95,6 @@ Client API. There are two ways to enable your key in the API package. |
79 | 95 | This route is particularly useful if you are building applications that |
80 | 96 | depend on this API, and are deploying them to hosting services. |
81 | 97 |
|
82 | | -You're now ready to go! From here you can view our tutorials on how to use the |
| 98 | +You are now ready to go! From here you can view our tutorials on how to use the |
83 | 99 | API to perform certain tasks, or see a full list of functions, classes and |
84 | 100 | methods available for use by navigating to `modules <modules.html>`_ |
0 commit comments