|
1 | | -.. include:: README.rst |
| 1 | +Python Client for Cloud IoT API (`Alpha`_) |
| 2 | +========================================== |
2 | 3 |
|
3 | | -Api Reference |
4 | | -------------- |
5 | | -.. toctree:: |
6 | | - :maxdepth: 2 |
| 4 | +`Cloud IoT API`_: Registers and manages IoT (Internet of Things) devices that connect to the |
| 5 | +Google Cloud Platform. |
7 | 6 |
|
8 | | - gapic/v1/api |
9 | | - gapic/v1/types |
| 7 | +- `Client Library Documentation`_ |
| 8 | +- `Product Documentation`_ |
| 9 | + |
| 10 | +.. _Alpha: https://github.com/googleapis/google-cloud-python/blob/master/README.rst |
| 11 | +.. _Cloud IoT API: https://cloud.google.com/iot |
| 12 | +.. _Client Library Documentation: https://googleapis.github.io/google-cloud-python/latest/iot/usage.html |
| 13 | +.. _Product Documentation: https://cloud.google.com/iot |
| 14 | + |
| 15 | +Quick Start |
| 16 | +----------- |
| 17 | + |
| 18 | +In order to use this library, you first need to go through the following steps: |
| 19 | + |
| 20 | +1. `Select or create a Cloud Platform project.`_ |
| 21 | +2. `Enable billing for your project.`_ |
| 22 | +3. `Enable the Cloud IoT API.`_ |
| 23 | +4. `Setup Authentication.`_ |
| 24 | + |
| 25 | +.. _Select or create a Cloud Platform project.: https://console.cloud.google.com/project |
| 26 | +.. _Enable billing for your project.: https://cloud.google.com/billing/docs/how-to/modify-project#enable_billing_for_a_project |
| 27 | +.. _Enable the Cloud IoT API.: https://cloud.google.com/iot |
| 28 | +.. _Setup Authentication.: https://googleapis.github.io/google-cloud-python/latest/core/auth.html |
| 29 | + |
| 30 | +Installation |
| 31 | +~~~~~~~~~~~~ |
| 32 | + |
| 33 | +Install this library in a `virtualenv`_ using pip. `virtualenv`_ is a tool to |
| 34 | +create isolated Python environments. The basic problem it addresses is one of |
| 35 | +dependencies and versions, and indirectly permissions. |
| 36 | + |
| 37 | +With `virtualenv`_, it's possible to install this library without needing system |
| 38 | +install permissions, and without clashing with the installed system |
| 39 | +dependencies. |
| 40 | + |
| 41 | +.. _`virtualenv`: https://virtualenv.pypa.io/en/latest/ |
| 42 | + |
| 43 | + |
| 44 | +Mac/Linux |
| 45 | +^^^^^^^^^ |
| 46 | + |
| 47 | +.. code-block:: console |
10 | 48 |
|
| 49 | + pip install virtualenv |
| 50 | + virtualenv <your-env> |
| 51 | + source <your-env>/bin/activate |
| 52 | + <your-env>/bin/pip install google-cloud-iot |
11 | 53 |
|
12 | | -Changelog |
13 | | ---------- |
14 | 54 |
|
15 | | -For a list of all ``google-cloud-iot`` releases: |
| 55 | +Windows |
| 56 | +^^^^^^^ |
16 | 57 |
|
| 58 | +.. code-block:: console |
| 59 | +
|
| 60 | + pip install virtualenv |
| 61 | + virtualenv <your-env> |
| 62 | + <your-env>\Scripts\activate |
| 63 | + <your-env>\Scripts\pip.exe install google-cloud-iot |
| 64 | +
|
| 65 | +Preview |
| 66 | +~~~~~~~ |
| 67 | + |
| 68 | +DeviceManagerClient |
| 69 | +^^^^^^^^^^^^^^^^^^^ |
| 70 | + |
| 71 | +.. code:: py |
| 72 | +
|
| 73 | + from google.cloud import iot_v1 |
| 74 | +
|
| 75 | + client = iot_v1.DeviceManagerClient() |
| 76 | +
|
| 77 | + parent = client.location_path('[PROJECT]', '[LOCATION]') |
| 78 | +
|
| 79 | + # Iterate over all results |
| 80 | + for element in client.list_device_registries(parent): |
| 81 | + # process element |
| 82 | + pass |
| 83 | +
|
| 84 | +Next Steps |
| 85 | +~~~~~~~~~~ |
| 86 | + |
| 87 | +- Read the `Client Library Documentation`_ for Cloud IoT API |
| 88 | + API to see other available methods on the client. |
| 89 | +- Read the `Cloud IoT API Product documentation`_ to learn |
| 90 | + more about the product and see How-to Guides. |
| 91 | +- View this `repository’s main README`_ to see the full list of Cloud |
| 92 | + APIs that we cover. |
| 93 | + |
| 94 | +.. _Cloud IoT API Product documentation: https://cloud.google.com/iot |
| 95 | +.. _repository’s main README: https://github.com/googleapis/google-cloud-python/blob/master/README.rst |
| 96 | + |
| 97 | +Api Reference |
| 98 | +------------- |
17 | 99 | .. toctree:: |
18 | | - :maxdepth: 2 |
| 100 | + :maxdepth: 2 |
19 | 101 |
|
20 | | - changelog |
| 102 | + gapic/v1/api |
| 103 | + gapic/v1/types |
0 commit comments