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