|
| 1 | +<section class="hero-banner"> |
| 2 | + <div class="container clearfix"> |
| 3 | + <div class="quote-box"> |
| 4 | + <h1>gcloud</h1> |
| 5 | + <p>Google Cloud Client Library for Python |
| 6 | + - an idiomatic, intuitive, and natural way for Python developers to |
| 7 | + integrate with Google Cloud Platform services, like Cloud Datastore |
| 8 | + and Cloud Storage.</p> |
| 9 | + </div> |
| 10 | + |
| 11 | + <div class="quote-box--supplementary"> |
| 12 | + <pre class="skip-highlight"><code class="subtle--blue">$</code> pip install <code class="subtle--blue">--upgrade</code> <strong>gcloud</strong></pre> |
| 13 | + <h4 class="latest-release subtle" ng-if="home.latestRelease"> |
| 14 | + Latest Release <a ng-href="{{home.latestRelease.link}}" class="latest-release--link white">{{home.latestRelease.name}}</a> |
| 15 | + {{home.latestRelease.date|date}} |
| 16 | + </h4> |
| 17 | + </div> |
| 18 | + </div><!-- end of .container --> |
| 19 | +</section><!-- end of .hero-banner --> |
| 20 | + |
| 21 | +<section class="block featuring"> |
| 22 | + <div class="container"> |
| 23 | + <ul class="featuring-links"> |
| 24 | + <li> |
| 25 | + <a href="#/docs/{{home.latestRelease.name}}/gcloud" title="gcloud-python docs" class="btn btn-docs"> |
| 26 | + <img src="src/images/icon-lang-python-gray.svg" alt="Python icon" /> |
| 27 | + Read the Docs |
| 28 | + </a> |
| 29 | + </li> |
| 30 | + <li> |
| 31 | + <a href="https://github.com/GoogleCloudPlatform/gcloud-python" title="gcloud-python on GitHub" class="ext-link"> |
| 32 | + <img src="src/images/icon-link-github.svg" alt="GitHub icon" /> |
| 33 | + GitHub |
| 34 | + </a> |
| 35 | + </li> |
| 36 | + <li> |
| 37 | + <a href="https://github.com/GoogleCloudPlatform/gcloud-python/issues" title="gcloud-python issues on Github" class="ext-link"> |
| 38 | + <img src="src/images/icon-link-github.svg" alt="GitHub icon" /> |
| 39 | + Issues |
| 40 | + </a> |
| 41 | + </li> |
| 42 | + <li> |
| 43 | + <a href="http://stackoverflow.com/questions/tagged/gcloud-python" title="gcloud-python on StackOverflow" class="ext-link"> |
| 44 | + <img src="src/images/icon-link-stackoverflow.svg" alt="StackOverflow icon" /> |
| 45 | + StackOverflow |
| 46 | + </a> |
| 47 | + </li> |
| 48 | + <li> |
| 49 | + <a href="https://pypi.python.org/pypi/gcloud" title="gcloud-python on pypi" class="ext-link"> |
| 50 | + <img src="src/images/icon-link-package-manager.svg" alt="pypi icon" /> |
| 51 | + PyPI |
| 52 | + </a> |
| 53 | + </li> |
| 54 | + </ul> |
| 55 | + </div><!-- end of .container --> |
| 56 | +</section><!-- end of .featuring --> |
| 57 | + |
| 58 | +<section class="block about"> |
| 59 | + <div class="container clearfix"> |
| 60 | + <div class="quote-box"> |
| 61 | + <h3 class="block-title">What is it?</h3> |
| 62 | + |
| 63 | + <p><code>gcloud</code> is a client library for accessing Google |
| 64 | + Cloud Platform services that significantly reduces the boilerplate |
| 65 | + code you have to write. The library provides high-level API |
| 66 | + abstractions so they're easier to understand. It embraces |
| 67 | + idioms of Python, works well with the standard library, and |
| 68 | + integrates better with your codebase. |
| 69 | + All this means you spend more time creating code that matters |
| 70 | + to you.</p> |
| 71 | + |
| 72 | + <p><code>gcloud</code> is configured to access Google Cloud Platform |
| 73 | + services and authorize (OAuth 2.0) automatically on your behalf. |
| 74 | + With a one-line install and a private key, you are up and ready |
| 75 | + to go. Better yet, if you are running on a Google Compute Engine |
| 76 | + instance, the one-line install is enough!</p> |
| 77 | + |
| 78 | + </div> |
| 79 | + |
| 80 | + <div class="quote-box--supplementary"> |
| 81 | + <h4>Retrieve Datastore Entities</h4> |
| 82 | + |
| 83 | + <div hljs hlsj-language="python"> |
| 84 | + from gcloud import datastore |
| 85 | + |
| 86 | + client = datastore.Client() |
| 87 | + product_key = client.key('Product', 123) |
| 88 | + print(client.get(product_key)) |
| 89 | + </div> |
| 90 | + </div> |
| 91 | + </div><!-- end of .container --> |
| 92 | +</section><!-- end of .featuring --> |
| 93 | + |
| 94 | +<section class="block examples"> |
| 95 | + <div class="container clearfix"> |
| 96 | + <h3 class="block-title">Examples</h3> |
| 97 | + |
| 98 | + <ul> |
| 99 | + <li> |
| 100 | + <a href="https://github.com/GoogleCloudPlatform/gcloud-python-expenses-demo"><code>gcloud-python-expenses-demo</code></a> - Use gcloud-python with the Datastore and Cloud Storage to manage expenses |
| 101 | + </li> |
| 102 | + </ul> |
| 103 | + </div> |
| 104 | +</section> |
| 105 | + |
| 106 | + <section class="block"> |
| 107 | + <div class="container clearfix"> |
| 108 | + <h3 class="block-title">FAQ</h3> |
| 109 | + |
| 110 | + <h4>What is the relationship between the <code>gcloud</code> package |
| 111 | + and the <code>gcloud</code> command-line tool?</h4> |
| 112 | + <p>Both the <code>gcloud</code> command-line tool and |
| 113 | + <code>gcloud</code> package are a part of the Google Cloud SDK: a collection |
| 114 | + of tools and libraries that enable you to easily create and manage |
| 115 | + resources on the Google Cloud Platform. The <code>gcloud</code> command-line |
| 116 | + tool can be used to manage both your development workflow and your |
| 117 | + Google Cloud Platform resources while the <code>gcloud</code> package is the |
| 118 | + Google Cloud Client Library for Python.</p> |
| 119 | + |
| 120 | + <h4>What is the relationship between <code>gcloud</code> |
| 121 | + and the Google APIs Python Client?</h4> |
| 122 | + <p>The <a href="https://github.com/google/google-api-python-client"> |
| 123 | + Google APIs Python Client</a> is a client library for |
| 124 | + using the broad set of Google APIs. |
| 125 | + <code>gcloud</code> is built specifically for the Google Cloud Platform |
| 126 | + and is the recommended way to integrate Google Cloud APIs into your |
| 127 | + Python applications. If your application requires both Google Cloud Platform and |
| 128 | + other Google APIs, the 2 libraries may be used by your application.</p> |
| 129 | + </div> |
| 130 | +</section> <!-- end of FAQ --> |
0 commit comments