From 05849f3d6aa43e947220e209619ea3a7e0df63c0 Mon Sep 17 00:00:00 2001 From: michaelawyu Date: Thu, 7 Dec 2017 10:34:29 -0800 Subject: [PATCH] Added "Open in Cloud Shell" buttons to README files (#1254) --- README.md | 5 + appengine/flexible/README.md | 5 + appengine/flexible/analytics/README.md | 5 + appengine/flexible/cloudsql/README.md | 5 + appengine/flexible/datastore/README.md | 5 + appengine/flexible/django_cloudsql/README.md | 5 + .../flexible/hello_world_django/README.md | 5 + appengine/flexible/mailgun/README.md | 5 + appengine/flexible/mailjet/README.md | 5 + appengine/flexible/memcache/README.md | 5 + .../flexible/multiple_services/README.md | 5 + appengine/flexible/pubsub/README.md | 5 + appengine/flexible/scipy/README.md | 5 + appengine/flexible/sendgrid/README.md | 5 + appengine/flexible/static_files/README.md | 5 + appengine/flexible/storage/README.md | 5 + appengine/flexible/tasks/README.md | 5 + appengine/flexible/twilio/README.md | 5 + appengine/standard/README.md | 5 + appengine/standard/angular/README.md | 5 + appengine/standard/background/README.md | 5 + appengine/standard/bigquery/README.md | 5 + appengine/standard/blobstore/api/README.md | 5 + appengine/standard/channel/README.md | 5 + appengine/standard/cloudsql/README.md | 5 + appengine/standard/django/README.md | 5 + .../endpoints-frameworks-v2/echo/README.md | 5 + .../standard/firebase/firenotes/README.md | 5 + .../standard/firebase/firetactoe/README.md | 5 + .../standard/flask/hello_world/README.md | 5 + appengine/standard/flask/tutorial/README.md | 5 + appengine/standard/i18n/README.md | 5 + appengine/standard/iap/README.md | 5 + appengine/standard/images/api/README.md | 5 + appengine/standard/images/guestbook/README.md | 5 + appengine/standard/localtesting/README.md | 5 + appengine/standard/mail/README.md | 5 + appengine/standard/mailgun/README.md | 5 + appengine/standard/mailjet/README.md | 5 + .../memcache/best_practices/README.md | 5 + .../standard/memcache/guestbook/README.md | 5 + appengine/standard/modules/README.md | 5 + appengine/standard/multitenancy/README.md | 5 + appengine/standard/ndb/async/README.md | 5 + .../standard/ndb/async/app_toplevel/README.md | 5 + appengine/standard/ndb/cache/README.md | 5 + appengine/standard/ndb/entities/README.md | 5 + appengine/standard/ndb/modeling/README.md | 5 + appengine/standard/ndb/overview/README.md | 5 + .../standard/ndb/projection_queries/README.md | 5 + appengine/standard/ndb/properties/README.md | 5 + .../ndb/property_subclasses/README.md | 5 + appengine/standard/ndb/queries/README.md | 5 + appengine/standard/ndb/transactions/README.md | 5 + appengine/standard/requests/README.md | 5 + appengine/standard/sendgrid/README.md | 5 + .../standard/storage/api-client/README.md | 5 + .../standard/taskqueue/counter/README.md | 5 + .../standard/taskqueue/pull-counter/README.md | 5 + appengine/standard/urlfetch/README.md | 5 + appengine/standard/xmpp/README.md | 5 + bigquery/api/README.rst | 151 ++++++++++------ bigquery/api/README.rst.in | 2 + bigquery/cloud-client/README.rst | 168 ++++++++++-------- bigquery/cloud-client/README.rst.in | 2 + bigquery/rest/README.rst | 15 +- bigquery/rest/README.rst.in | 2 + bigtable/hello/README.rst | 15 +- bigtable/hello/README.rst.in | 2 + bigtable/hello_happybase/README.rst | 15 +- bigtable/hello_happybase/README.rst.in | 2 + bigtable/metricscaler/README.rst | 15 +- bigtable/metricscaler/README.rst.in | 2 + blog/README.md | 5 + .../README.md | 5 + codelabs/flex_and_vision/README.md | 5 + compute/README.md | 5 + compute/api/README.md | 5 + compute/metadata/README.md | 5 + compute/xmpp_wikibot/README.md | 5 + container_engine/api-client/README.rst | 13 +- container_engine/api-client/README.rst.in | 2 + container_engine/django_tutorial/README.md | 5 + dataproc/README.md | 5 + datastore/cloud-client/README.rst | 23 ++- datastore/cloud-client/README.rst.in | 2 + dns/api/README.rst | 8 + dns/api/README.rst.in | 2 + endpoints/bookstore-grpc/README.md | 5 + endpoints/getting-started-grpc/README.md | 5 + endpoints/getting-started/README.md | 5 + endpoints/kubernetes/README.md | 5 + error_reporting/api/README.rst | 8 + error_reporting/api/README.rst.in | 2 + error_reporting/fluent_on_compute/README.md | 5 + iap/README.md | 5 + iot/api-client/README.md | 5 + iot/api-client/http_example/README.rst | 13 +- iot/api-client/http_example/README.rst.in | 2 + iot/api-client/manager/README.rst | 19 +- iot/api-client/manager/README.rst.in | 2 + iot/api-client/manager/resources/README.md | 5 + iot/api-client/mqtt_example/README.rst | 8 + iot/api-client/mqtt_example/README.rst.in | 2 + iot/api-client/scripts/README.rst | 17 +- iot/api-client/scripts/README.rst.in | 2 + kms/api-client/README.rst | 21 ++- kms/api-client/README.rst.in | 2 + language/README.md | 5 + language/api/README.rst | 15 +- language/api/README.rst.in | 2 + language/classify_text/README.rst | 58 +++--- language/classify_text/README.rst.in | 2 + language/cloud-client/v1/README.rst | 28 ++- language/cloud-client/v1/README.rst.in | 2 + language/cloud-client/v1beta2/README.rst | 21 ++- language/cloud-client/v1beta2/README.rst.in | 2 + language/movie_nl/README.md | 5 + language/ocr_nl/README.md | 5 + language/sentiment/README.md | 5 + language/syntax_triples/README.md | 5 + language/tutorial/README.rst | 13 +- language/tutorial/README.rst.in | 2 + logging/cloud-client/README.rst | 40 +++-- logging/cloud-client/README.rst.in | 2 + ml_engine/online_prediction/README.md | 5 + monitoring/api/v3/api-client/README.rst | 38 ++-- monitoring/api/v3/api-client/README.rst.in | 2 + monitoring/api/v3/cloud-client/README.rst | 19 +- monitoring/api/v3/cloud-client/README.rst.in | 2 + pubsub/cloud-client/README.rst | 55 ++++-- pubsub/cloud-client/README.rst.in | 2 + scripts/README.md | 5 + scripts/readme-gen/templates/README.tmpl.rst | 8 + spanner/cloud-client/README.rst | 19 +- spanner/cloud-client/README.rst.in | 2 + speech/cloud-client/README.rst | 60 +++++-- speech/cloud-client/README.rst.in | 2 + storage/api/README.rst | 78 +++++--- storage/api/README.rst.in | 2 + storage/cloud-client/README.rst | 80 ++++++--- storage/cloud-client/README.rst.in | 2 + storage/transfer_service/README.rst | 55 ++++-- storage/transfer_service/README.rst.in | 2 + tasks/README.md | 5 + translate/cloud-client/README.rst | 21 ++- translate/cloud-client/README.rst.in | 2 + video/cloud-client/analyze/README.rst | 21 ++- video/cloud-client/analyze/README.rst.in | 2 + .../cloud-client/analyze/resources/README.md | 5 + video/cloud-client/faces/README.rst | 25 ++- video/cloud-client/faces/README.rst.in | 2 + video/cloud-client/labels/README.rst | 26 ++- video/cloud-client/labels/README.rst.in | 2 + video/cloud-client/quickstart/README.rst | 8 + video/cloud-client/quickstart/README.rst.in | 2 + video/cloud-client/shotchange/README.rst | 25 ++- video/cloud-client/shotchange/README.rst.in | 2 + vision/api/label/README.rst | 13 +- vision/api/label/README.rst.in | 2 + vision/cloud-client/crop_hints/README.rst | 13 +- vision/cloud-client/crop_hints/README.rst.in | 2 + vision/cloud-client/detect/README.rst | 19 +- vision/cloud-client/detect/README.rst.in | 2 + vision/cloud-client/document_text/README.rst | 13 +- .../cloud-client/document_text/README.rst.in | 2 + vision/cloud-client/face_detection/README.rst | 15 +- .../cloud-client/face_detection/README.rst.in | 2 + vision/cloud-client/quickstart/README.rst | 8 + vision/cloud-client/quickstart/README.rst.in | 2 + vision/cloud-client/web/README.rst | 17 +- vision/cloud-client/web/README.rst.in | 2 + 172 files changed, 1448 insertions(+), 391 deletions(-) diff --git a/README.md b/README.md index 935b2b789261..76f46ce2f831 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,10 @@ ## Google Cloud Platform Python Samples +[![Open in Cloud Shell][shell_img]][shell_link] + +[shell_img]: http://gstatic.com/cloudssh/images/open-btn.png +[shell_link]: https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/GoogleCloudPlatform/python-docs-samples&page=editor&open_in_editor=./README.md + This repository holds the samples used in the python documentation on [cloud.google.com](https://cloud.google.com). [![Build Status](https://travis-ci.org/GoogleCloudPlatform/python-docs-samples.svg)](https://travis-ci.org/GoogleCloudPlatform/python-docs-samples) diff --git a/appengine/flexible/README.md b/appengine/flexible/README.md index 18c2971ed18b..c2182a219f1a 100644 --- a/appengine/flexible/README.md +++ b/appengine/flexible/README.md @@ -1,5 +1,10 @@ ## Google App Engine Flexible Environment Python Samples +[![Open in Cloud Shell][shell_img]][shell_link] + +[shell_img]: http://gstatic.com/cloudssh/images/open-btn.png +[shell_link]: https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/GoogleCloudPlatform/python-docs-samples&page=editor&open_in_editor=appengine/flexible/README.md + These are samples for using Python on Google App Engine Flexible Environment. These samples are typically referenced from the [docs](https://cloud.google.com/appengine/docs). See our other [Google Cloud Platform github repos](https://github.com/GoogleCloudPlatform) for sample applications and diff --git a/appengine/flexible/analytics/README.md b/appengine/flexible/analytics/README.md index 60cfece907a8..2646e144ed01 100644 --- a/appengine/flexible/analytics/README.md +++ b/appengine/flexible/analytics/README.md @@ -1,5 +1,10 @@ # Google Analytics Measurement Protocol sample for Google App Engine Flexible +[![Open in Cloud Shell][shell_img]][shell_link] + +[shell_img]: http://gstatic.com/cloudssh/images/open-btn.png +[shell_link]: https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/GoogleCloudPlatform/python-docs-samples&page=editor&open_in_editor=appengine/flexible/analytics/README.md + This sample demonstrates how to use the [Google Analytics Measurement Protocol](https://developers.google.com/analytics/devguides/collection/protocol/v1/) (or any other SQL server) on [Google App Engine Flexible Environment](https://cloud.google.com/appengine). ## Setup diff --git a/appengine/flexible/cloudsql/README.md b/appengine/flexible/cloudsql/README.md index 76ccabd80c46..947ff96ddb11 100644 --- a/appengine/flexible/cloudsql/README.md +++ b/appengine/flexible/cloudsql/README.md @@ -1,5 +1,10 @@ # Python Google Cloud SQL sample for Google App Engine Flexible +[![Open in Cloud Shell][shell_img]][shell_link] + +[shell_img]: http://gstatic.com/cloudssh/images/open-btn.png +[shell_link]: https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/GoogleCloudPlatform/python-docs-samples&page=editor&open_in_editor=appengine/flexible/cloudsql/README.md + This sample demonstrates how to use [Google Cloud SQL](https://cloud.google.com/sql/) (or any other SQL server) on [Google App Engine Flexible](https://cloud.google.com/appengine). ## Setup diff --git a/appengine/flexible/datastore/README.md b/appengine/flexible/datastore/README.md index da3c992ebb69..3a3a0b9e4bc2 100644 --- a/appengine/flexible/datastore/README.md +++ b/appengine/flexible/datastore/README.md @@ -1,5 +1,10 @@ # Python Google Cloud Datastore sample for Google App Engine Flexible Environment +[![Open in Cloud Shell][shell_img]][shell_link] + +[shell_img]: http://gstatic.com/cloudssh/images/open-btn.png +[shell_link]: https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/GoogleCloudPlatform/python-docs-samples&page=editor&open_in_editor=appengine/flexible/datastore/README.md + This sample demonstrates how to use [Google Cloud Datastore](https://cloud.google.com/datastore/) on [Google App Engine Flexible Environment](https://cloud.google.com/appengine). ## Setup diff --git a/appengine/flexible/django_cloudsql/README.md b/appengine/flexible/django_cloudsql/README.md index 5030de82a8b3..3a723b5f9f12 100644 --- a/appengine/flexible/django_cloudsql/README.md +++ b/appengine/flexible/django_cloudsql/README.md @@ -1,5 +1,10 @@ # Getting started with Django on Google Cloud Platform on App Engine Flexible +[![Open in Cloud Shell][shell_img]][shell_link] + +[shell_img]: http://gstatic.com/cloudssh/images/open-btn.png +[shell_link]: https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/GoogleCloudPlatform/python-docs-samples&page=editor&open_in_editor=appengine/flexible/django_cloudsql/README.md + This repository is an example of how to run a [Django](https://www.djangoproject.com/) app on Google App Engine Flexible Environment. It uses the [Writing your first Django app](https://docs.djangoproject.com/en/1.9/intro/tutorial01/) as the diff --git a/appengine/flexible/hello_world_django/README.md b/appengine/flexible/hello_world_django/README.md index 2e2891210dbf..785392337098 100644 --- a/appengine/flexible/hello_world_django/README.md +++ b/appengine/flexible/hello_world_django/README.md @@ -1,5 +1,10 @@ # Django sample for Google App Engine Flexible Environment +[![Open in Cloud Shell][shell_img]][shell_link] + +[shell_img]: http://gstatic.com/cloudssh/images/open-btn.png +[shell_link]: https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/GoogleCloudPlatform/python-docs-samples&page=editor&open_in_editor=appengine/flexible/hello_world_django/README.md + This is a basic hello world [Django](https://www.djangoproject.com/) example for [Google App Engine Flexible Environment](https://cloud.google.com/appengine). diff --git a/appengine/flexible/mailgun/README.md b/appengine/flexible/mailgun/README.md index 92703fa18591..58991f749b45 100644 --- a/appengine/flexible/mailgun/README.md +++ b/appengine/flexible/mailgun/README.md @@ -1,5 +1,10 @@ # Python Mailgun email sample for Google App Engine Flexible Environment +[![Open in Cloud Shell][shell_img]][shell_link] + +[shell_img]: http://gstatic.com/cloudssh/images/open-btn.png +[shell_link]: https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/GoogleCloudPlatform/python-docs-samples&page=editor&open_in_editor=appengine/flexible/mailgun/README.md + This sample demonstrates how to use [Mailgun](https://www.mailgun.com) on [Google App Engine Flexible Environment](https://cloud.google.com/appengine). For more information about Mail, see their [documentation](https://documentation.mailgun.com/). diff --git a/appengine/flexible/mailjet/README.md b/appengine/flexible/mailjet/README.md index 4d0d18bdeae6..1d9cb379eac4 100644 --- a/appengine/flexible/mailjet/README.md +++ b/appengine/flexible/mailjet/README.md @@ -1,5 +1,10 @@ # Python Mailjet email sample for Google App Engine Flexible +[![Open in Cloud Shell][shell_img]][shell_link] + +[shell_img]: http://gstatic.com/cloudssh/images/open-btn.png +[shell_link]: https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/GoogleCloudPlatform/python-docs-samples&page=editor&open_in_editor=appengine/flexible/mailjet/README.md + This sample demonstrates how to use [Mailjet](https://www.mailjet.com) on [Google App Engine Flexible](https://cloud.google.com/appengine/docs/flexible/). ## Setup diff --git a/appengine/flexible/memcache/README.md b/appengine/flexible/memcache/README.md index 75caf3590be4..76a70a2657e1 100644 --- a/appengine/flexible/memcache/README.md +++ b/appengine/flexible/memcache/README.md @@ -1,5 +1,10 @@ ## Note +[![Open in Cloud Shell][shell_img]][shell_link] + +[shell_img]: http://gstatic.com/cloudssh/images/open-btn.png +[shell_link]: https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/GoogleCloudPlatform/python-docs-samples&page=editor&open_in_editor=appengine/flexible/memcache/README.md + This sample demonstrates connecting to existing Memcache servers, or the built-in Memcache server. diff --git a/appengine/flexible/multiple_services/README.md b/appengine/flexible/multiple_services/README.md index 705087f9d76b..3f0adfab8aa5 100644 --- a/appengine/flexible/multiple_services/README.md +++ b/appengine/flexible/multiple_services/README.md @@ -1,5 +1,10 @@ # Python Google Cloud Microservices Example - API Gateway +[![Open in Cloud Shell][shell_img]][shell_link] + +[shell_img]: http://gstatic.com/cloudssh/images/open-btn.png +[shell_link]: https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/GoogleCloudPlatform/python-docs-samples&page=editor&open_in_editor=appengine/flexible/multiple_services/README.md + This example demonstrates how to deploy multiple python services to [App Engine flexible environment](https://cloud.google.com/appengine/docs/flexible/) ## To Run Locally diff --git a/appengine/flexible/pubsub/README.md b/appengine/flexible/pubsub/README.md index 04ef158e9e07..c4c655006818 100644 --- a/appengine/flexible/pubsub/README.md +++ b/appengine/flexible/pubsub/README.md @@ -1,5 +1,10 @@ # Python Google Cloud Pub/Sub sample for Google App Engine Flexible Environment +[![Open in Cloud Shell][shell_img]][shell_link] + +[shell_img]: http://gstatic.com/cloudssh/images/open-btn.png +[shell_link]: https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/GoogleCloudPlatform/python-docs-samples&page=editor&open_in_editor=appengine/flexible/pubsub/README.md + This demonstrates how to send and receive messages using [Google Cloud Pub/Sub](https://cloud.google.com/pubsub) on [Google App Engine Flexible Environment](https://cloud.google.com/appengine). ## Setup diff --git a/appengine/flexible/scipy/README.md b/appengine/flexible/scipy/README.md index 4f0df0365499..3217ab68726b 100644 --- a/appengine/flexible/scipy/README.md +++ b/appengine/flexible/scipy/README.md @@ -1,4 +1,9 @@ # SciPy on App Engine Flexible +[![Open in Cloud Shell][shell_img]][shell_link] + +[shell_img]: http://gstatic.com/cloudssh/images/open-btn.png +[shell_link]: https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/GoogleCloudPlatform/python-docs-samples&page=editor&open_in_editor=appengine/flexible/scipy/README.md + This sample demonstrates how to use SciPy to resize an image on App Engine Flexible. diff --git a/appengine/flexible/sendgrid/README.md b/appengine/flexible/sendgrid/README.md index a709ae7ff05b..14d629e58f25 100644 --- a/appengine/flexible/sendgrid/README.md +++ b/appengine/flexible/sendgrid/README.md @@ -1,5 +1,10 @@ # Python SendGrid email sample for Google App Engine Flexible +[![Open in Cloud Shell][shell_img]][shell_link] + +[shell_img]: http://gstatic.com/cloudssh/images/open-btn.png +[shell_link]: https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/GoogleCloudPlatform/python-docs-samples&page=editor&open_in_editor=appengine/flexible/sendgrid/README.md + This sample demonstrates how to use [SendGrid](https://www.sendgrid.com) on [Google App Engine Flexible](https://cloud.google.com/appengine). For more information about SendGrid, see their [documentation](https://sendgrid.com/docs/User_Guide/index.html). diff --git a/appengine/flexible/static_files/README.md b/appengine/flexible/static_files/README.md index a2b38d0d633e..249a478127e1 100644 --- a/appengine/flexible/static_files/README.md +++ b/appengine/flexible/static_files/README.md @@ -1,5 +1,10 @@ # Python / Flask static files sample for Google App Engine Flexible Environment +[![Open in Cloud Shell][shell_img]][shell_link] + +[shell_img]: http://gstatic.com/cloudssh/images/open-btn.png +[shell_link]: https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/GoogleCloudPlatform/python-docs-samples&page=editor&open_in_editor=appengine/flexible/static_files/README.md + This demonstrates how to use [Flask](http://flask.pocoo.org/) to serve static files in your application. Flask automatically makes anything in the ``static`` directory available via the ``/static`` URL. If you plan on using a different framework, it may have different conventions for serving static files. diff --git a/appengine/flexible/storage/README.md b/appengine/flexible/storage/README.md index 3a38faa60ed1..051e49a23758 100644 --- a/appengine/flexible/storage/README.md +++ b/appengine/flexible/storage/README.md @@ -1,5 +1,10 @@ # Python Google Cloud Storage sample for Google App Engine Flexible Environment +[![Open in Cloud Shell][shell_img]][shell_link] + +[shell_img]: http://gstatic.com/cloudssh/images/open-btn.png +[shell_link]: https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/GoogleCloudPlatform/python-docs-samples&page=editor&open_in_editor=appengine/flexible/storage/README.md + This sample demonstrates how to use [Google Cloud Storage](https://cloud.google.com/storage/) on [Google App Engine Flexible Environment](https://cloud.google.com/appengine). ## Setup diff --git a/appengine/flexible/tasks/README.md b/appengine/flexible/tasks/README.md index 1906ebf24bc1..60f4b69e3d31 100644 --- a/appengine/flexible/tasks/README.md +++ b/appengine/flexible/tasks/README.md @@ -1,5 +1,10 @@ # Google Cloud Tasks App Engine Queue Samples +[![Open in Cloud Shell][shell_img]][shell_link] + +[shell_img]: http://gstatic.com/cloudssh/images/open-btn.png +[shell_link]: https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/GoogleCloudPlatform/python-docs-samples&page=editor&open_in_editor=appengine/flexible/tasks/README.md + Sample command-line program for interacting with the Cloud Tasks API using App Engine queues. diff --git a/appengine/flexible/twilio/README.md b/appengine/flexible/twilio/README.md index b93af17be7ca..432acef801a5 100644 --- a/appengine/flexible/twilio/README.md +++ b/appengine/flexible/twilio/README.md @@ -1,5 +1,10 @@ # Python Twilio voice and SMS sample for Google App Engine Flexible Environment +[![Open in Cloud Shell][shell_img]][shell_link] + +[shell_img]: http://gstatic.com/cloudssh/images/open-btn.png +[shell_link]: https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/GoogleCloudPlatform/python-docs-samples&page=editor&open_in_editor=appengine/flexible/twilio/README.md + This sample demonstrates how to use [Twilio](https://www.twilio.com) on [Google App Engine Flexible Environment](https://cloud.google.com/appengine). For more information about Twilio, see their [Python quickstart tutorials](https://www.twilio.com/docs/quickstart/python). diff --git a/appengine/standard/README.md b/appengine/standard/README.md index e4701792e055..5115bf90a92e 100644 --- a/appengine/standard/README.md +++ b/appengine/standard/README.md @@ -1,5 +1,10 @@ # Google App Engine Samples +[![Open in Cloud Shell][shell_img]][shell_link] + +[shell_img]: http://gstatic.com/cloudssh/images/open-btn.png +[shell_link]: https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/GoogleCloudPlatform/python-docs-samples&page=editor&open_in_editor=appengine/standard/README.md + This section contains samples for [Google App Engine](https://cloud.google.com/appengine). Most of these samples have associated documentation that is linked within the docstring of the sample itself. diff --git a/appengine/standard/angular/README.md b/appengine/standard/angular/README.md index 4e3c3539b858..cb2132c595ed 100644 --- a/appengine/standard/angular/README.md +++ b/appengine/standard/angular/README.md @@ -1,5 +1,10 @@ ## App Engine & Angular JS +[![Open in Cloud Shell][shell_img]][shell_link] + +[shell_img]: http://gstatic.com/cloudssh/images/open-btn.png +[shell_link]: https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/GoogleCloudPlatform/python-docs-samples&page=editor&open_in_editor=appengine/standard/angular/README.md + A simple [AngularJS](http://angularjs.org/) CRUD application for [Google App Engine](https://appengine.google.com/). Refer to the [App Engine Samples README](../README.md) for information on how to run and deploy this sample. diff --git a/appengine/standard/background/README.md b/appengine/standard/background/README.md index 10d1cd0e77ab..b945953e9134 100644 --- a/appengine/standard/background/README.md +++ b/appengine/standard/background/README.md @@ -1,5 +1,10 @@ # Using Background Threads from Google App Engine +[![Open in Cloud Shell][shell_img]][shell_link] + +[shell_img]: http://gstatic.com/cloudssh/images/open-btn.png +[shell_link]: https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/GoogleCloudPlatform/python-docs-samples&page=editor&open_in_editor=appengine/standard/background/README.md + This example shows how to use manual or basic scaling to start App Engine background threads. See the [documentation on modules](https://cloud.google.com/appengine/docs/python/modules/) for diff --git a/appengine/standard/bigquery/README.md b/appengine/standard/bigquery/README.md index 0dc4b7cdb563..5b00c0630876 100644 --- a/appengine/standard/bigquery/README.md +++ b/appengine/standard/bigquery/README.md @@ -1,5 +1,10 @@ # Google App Engine accessing BigQuery using OAuth2 +[![Open in Cloud Shell][shell_img]][shell_link] + +[shell_img]: http://gstatic.com/cloudssh/images/open-btn.png +[shell_link]: https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/GoogleCloudPlatform/python-docs-samples&page=editor&open_in_editor=appengine/standard/bigquery/README.md + This sample demonstrates [authenticating to BigQuery in App Engine using OAuth2](https://cloud.google.com/bigquery/authentication). diff --git a/appengine/standard/blobstore/api/README.md b/appengine/standard/blobstore/api/README.md index 0f7531d48484..d171d4e1d862 100644 --- a/appengine/standard/blobstore/api/README.md +++ b/appengine/standard/blobstore/api/README.md @@ -1,5 +1,10 @@ # App Engine Blobstore Sample +[![Open in Cloud Shell][shell_img]][shell_link] + +[shell_img]: http://gstatic.com/cloudssh/images/open-btn.png +[shell_link]: https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/GoogleCloudPlatform/python-docs-samples&page=editor&open_in_editor=appengine/standard/blobstore/api/README.md + These samples are used on the following documentation pages: diff --git a/appengine/standard/channel/README.md b/appengine/standard/channel/README.md index dc402e1b7212..5ff77d34d887 100644 --- a/appengine/standard/channel/README.md +++ b/appengine/standard/channel/README.md @@ -1,4 +1,9 @@ To deploy, run the following command, or see [here](https://cloud.google.com/appengine/docs/python/gettingstartedpython27/uploading) for more details about uploading your application. +[![Open in Cloud Shell][shell_img]][shell_link] + +[shell_img]: http://gstatic.com/cloudssh/images/open-btn.png +[shell_link]: https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/GoogleCloudPlatform/python-docs-samples&page=editor&open_in_editor=appengine/standard/channel/README.md + `appcfg.py -A update .` diff --git a/appengine/standard/cloudsql/README.md b/appengine/standard/cloudsql/README.md index e4d839cb2ac3..134c69f28443 100644 --- a/appengine/standard/cloudsql/README.md +++ b/appengine/standard/cloudsql/README.md @@ -1,5 +1,10 @@ # Using Cloud SQL from Google App Engine +[![Open in Cloud Shell][shell_img]][shell_link] + +[shell_img]: http://gstatic.com/cloudssh/images/open-btn.png +[shell_link]: https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/GoogleCloudPlatform/python-docs-samples&page=editor&open_in_editor=appengine/standard/cloudsql/README.md + This is an example program showing how to use the native MySQL connections from Google App Engine to [Google Cloud SQL](https://cloud.google.com/sql). Refer to the [App Engine Samples README](../README.md) for information on how to run and deploy this sample. diff --git a/appengine/standard/django/README.md b/appengine/standard/django/README.md index 522185849c7e..7292e794aaa7 100644 --- a/appengine/standard/django/README.md +++ b/appengine/standard/django/README.md @@ -1,5 +1,10 @@ # Getting started with Django on Google Cloud Platform on App Engine Standard +[![Open in Cloud Shell][shell_img]][shell_link] + +[shell_img]: http://gstatic.com/cloudssh/images/open-btn.png +[shell_link]: https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/GoogleCloudPlatform/python-docs-samples&page=editor&open_in_editor=appengine/standard/django/README.md + This repository is an example of how to run a [Django](https://www.djangoproject.com/) app on Google App Engine Standard Environment. It uses the [Writing your first Django app](https://docs.djangoproject.com/en/1.9/intro/tutorial01/) as the diff --git a/appengine/standard/endpoints-frameworks-v2/echo/README.md b/appengine/standard/endpoints-frameworks-v2/echo/README.md index d0ba17ddfeba..3a6144015ce2 100644 --- a/appengine/standard/endpoints-frameworks-v2/echo/README.md +++ b/appengine/standard/endpoints-frameworks-v2/echo/README.md @@ -1,5 +1,10 @@ ## Endpoints Frameworks v2 Python Sample +[![Open in Cloud Shell][shell_img]][shell_link] + +[shell_img]: http://gstatic.com/cloudssh/images/open-btn.png +[shell_link]: https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/GoogleCloudPlatform/python-docs-samples&page=editor&open_in_editor=appengine/standard/endpoints-frameworks-v2/echo/README.md + This demonstrates how to use Google Cloud Endpoints Frameworks v2 on Google App Engine Standard Environment using Python. ## Setup diff --git a/appengine/standard/firebase/firenotes/README.md b/appengine/standard/firebase/firenotes/README.md index 2a544a8bbcce..880ee03844d1 100644 --- a/appengine/standard/firebase/firenotes/README.md +++ b/appengine/standard/firebase/firenotes/README.md @@ -1,5 +1,10 @@ # Firenotes: Firebase Authentication on Google App Engine +[![Open in Cloud Shell][shell_img]][shell_link] + +[shell_img]: http://gstatic.com/cloudssh/images/open-btn.png +[shell_link]: https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/GoogleCloudPlatform/python-docs-samples&page=editor&open_in_editor=appengine/standard/firebase/firenotes/README.md + A simple note-taking application that stores users' notes in their own personal notebooks separated by a unique user ID generated by Firebase. Uses Firebase Authentication, Google App Engine, and Google Cloud Datastore. diff --git a/appengine/standard/firebase/firetactoe/README.md b/appengine/standard/firebase/firetactoe/README.md index e1ebe86ec712..e52cc1f061f2 100644 --- a/appengine/standard/firebase/firetactoe/README.md +++ b/appengine/standard/firebase/firetactoe/README.md @@ -1,5 +1,10 @@ # Tic Tac Toe, using Firebase, on App Engine Standard +[![Open in Cloud Shell][shell_img]][shell_link] + +[shell_img]: http://gstatic.com/cloudssh/images/open-btn.png +[shell_link]: https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/GoogleCloudPlatform/python-docs-samples&page=editor&open_in_editor=appengine/standard/firebase/firetactoe/README.md + This sample shows how to use the [Firebase](https://firebase.google.com/) realtime database to implement a simple Tic Tac Toe game on [Google App Engine Standard](https://cloud.google.com/appengine). diff --git a/appengine/standard/flask/hello_world/README.md b/appengine/standard/flask/hello_world/README.md index e2749c87e56c..caf101d4db9c 100644 --- a/appengine/standard/flask/hello_world/README.md +++ b/appengine/standard/flask/hello_world/README.md @@ -1,5 +1,10 @@ # App Engine Standard Flask Hello World +[![Open in Cloud Shell][shell_img]][shell_link] + +[shell_img]: http://gstatic.com/cloudssh/images/open-btn.png +[shell_link]: https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/GoogleCloudPlatform/python-docs-samples&page=editor&open_in_editor=appengine/standard/flask/hello_world/README.md + This sample shows how to use [Flask](http://flask.pocoo.org/) with Google App Engine Standard. diff --git a/appengine/standard/flask/tutorial/README.md b/appengine/standard/flask/tutorial/README.md index 46f841935ec0..f334542e8352 100644 --- a/appengine/standard/flask/tutorial/README.md +++ b/appengine/standard/flask/tutorial/README.md @@ -1,5 +1,10 @@ # App Engine Standard Flask Tutorial App +[![Open in Cloud Shell][shell_img]][shell_link] + +[shell_img]: http://gstatic.com/cloudssh/images/open-btn.png +[shell_link]: https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/GoogleCloudPlatform/python-docs-samples&page=editor&open_in_editor=appengine/standard/flask/tutorial/README.md + This sample shows how to use [Flask](http://flask.pocoo.org/) to handle requests, forms, templates, and static files on Google App Engine Standard. diff --git a/appengine/standard/i18n/README.md b/appengine/standard/i18n/README.md index ab982f2b81e8..04b9063579d1 100644 --- a/appengine/standard/i18n/README.md +++ b/appengine/standard/i18n/README.md @@ -1,5 +1,10 @@ # App Engine Internationalization Sample +[![Open in Cloud Shell][shell_img]][shell_link] + +[shell_img]: http://gstatic.com/cloudssh/images/open-btn.png +[shell_link]: https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/GoogleCloudPlatform/python-docs-samples&page=editor&open_in_editor=appengine/standard/i18n/README.md + A simple example app showing how to build an internationalized app with App Engine. diff --git a/appengine/standard/iap/README.md b/appengine/standard/iap/README.md index 3f8471a13f72..7840922be38e 100644 --- a/appengine/standard/iap/README.md +++ b/appengine/standard/iap/README.md @@ -1,5 +1,10 @@ # Identity-Aware Proxy Refresh Session Sample +[![Open in Cloud Shell][shell_img]][shell_link] + +[shell_img]: http://gstatic.com/cloudssh/images/open-btn.png +[shell_link]: https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/GoogleCloudPlatform/python-docs-samples&page=editor&open_in_editor=appengine/standard/iap/README.md + This sample is used on the following documentation page: * https://cloud.google.com/iap/docs/sessions-howto diff --git a/appengine/standard/images/api/README.md b/appengine/standard/images/api/README.md index 787710dbf86e..c4c4bb536c18 100644 --- a/appengine/standard/images/api/README.md +++ b/appengine/standard/images/api/README.md @@ -1,5 +1,10 @@ ## Images Guestbook Sample +[![Open in Cloud Shell][shell_img]][shell_link] + +[shell_img]: http://gstatic.com/cloudssh/images/open-btn.png +[shell_link]: https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/GoogleCloudPlatform/python-docs-samples&page=editor&open_in_editor=appengine/standard/images/api/README.md + This is a sample app for Google App Engine that demonstrates the [Images Python API](https://cloud.google.com/appengine/docs/python/images/usingimages). diff --git a/appengine/standard/images/guestbook/README.md b/appengine/standard/images/guestbook/README.md index 99154fab7e71..00fbcadfa5f0 100644 --- a/appengine/standard/images/guestbook/README.md +++ b/appengine/standard/images/guestbook/README.md @@ -1,5 +1,10 @@ ## Images Guestbook Sample +[![Open in Cloud Shell][shell_img]][shell_link] + +[shell_img]: http://gstatic.com/cloudssh/images/open-btn.png +[shell_link]: https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/GoogleCloudPlatform/python-docs-samples&page=editor&open_in_editor=appengine/standard/images/guestbook/README.md + This is a sample app for Google App Engine that demonstrates the [Images Python API](https://cloud.google.com/appengine/docs/python/images/usingimages). diff --git a/appengine/standard/localtesting/README.md b/appengine/standard/localtesting/README.md index 0d45442f02b1..94ffc327f57d 100644 --- a/appengine/standard/localtesting/README.md +++ b/appengine/standard/localtesting/README.md @@ -1,5 +1,10 @@ # App Engine Local Testing Samples +[![Open in Cloud Shell][shell_img]][shell_link] + +[shell_img]: http://gstatic.com/cloudssh/images/open-btn.png +[shell_link]: https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/GoogleCloudPlatform/python-docs-samples&page=editor&open_in_editor=appengine/standard/localtesting/README.md + These samples show how to do automated testing of App Engine applications. diff --git a/appengine/standard/mail/README.md b/appengine/standard/mail/README.md index f58388c6dec6..39deeadfe267 100644 --- a/appengine/standard/mail/README.md +++ b/appengine/standard/mail/README.md @@ -1,5 +1,10 @@ ## App Engine Email Docs Snippets +[![Open in Cloud Shell][shell_img]][shell_link] + +[shell_img]: http://gstatic.com/cloudssh/images/open-btn.png +[shell_link]: https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/GoogleCloudPlatform/python-docs-samples&page=editor&open_in_editor=appengine/standard/mail/README.md + This sample application demonstrates different ways to send and receive email on App Engine diff --git a/appengine/standard/mailgun/README.md b/appengine/standard/mailgun/README.md index 2973827801e2..b91083e5de0c 100644 --- a/appengine/standard/mailgun/README.md +++ b/appengine/standard/mailgun/README.md @@ -1,5 +1,10 @@ # Mailgun & Google App Engine +[![Open in Cloud Shell][shell_img]][shell_link] + +[shell_img]: http://gstatic.com/cloudssh/images/open-btn.png +[shell_link]: https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/GoogleCloudPlatform/python-docs-samples&page=editor&open_in_editor=appengine/standard/mailgun/README.md + This sample application demonstrates how to use [Mailgun with Google App Engine](https://cloud.google.com/appengine/docs/python/mail/mailgun). Refer to the [App Engine Samples README](../../README.md) for information on how to run and deploy this sample. diff --git a/appengine/standard/mailjet/README.md b/appengine/standard/mailjet/README.md index 3880c174d4d3..5e2c9008bbbb 100644 --- a/appengine/standard/mailjet/README.md +++ b/appengine/standard/mailjet/README.md @@ -1,5 +1,10 @@ # Python Mailjet email sample for Google App Engine Standard +[![Open in Cloud Shell][shell_img]][shell_link] + +[shell_img]: http://gstatic.com/cloudssh/images/open-btn.png +[shell_link]: https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/GoogleCloudPlatform/python-docs-samples&page=editor&open_in_editor=appengine/standard/mailjet/README.md + This sample demonstrates how to use [Mailjet](https://www.mailgun.com) on [Google App Engine Standard](https://cloud.google.com/appengine/docs/). ## Setup diff --git a/appengine/standard/memcache/best_practices/README.md b/appengine/standard/memcache/best_practices/README.md index 9c72cb15aa81..b9772f74959a 100644 --- a/appengine/standard/memcache/best_practices/README.md +++ b/appengine/standard/memcache/best_practices/README.md @@ -1,5 +1,10 @@ # Memcache Best Practices +[![Open in Cloud Shell][shell_img]][shell_link] + +[shell_img]: http://gstatic.com/cloudssh/images/open-btn.png +[shell_link]: https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/GoogleCloudPlatform/python-docs-samples&page=editor&open_in_editor=appengine/standard/memcache/best_practices/README.md + Code snippets for [Memcache Cache Best Practices article](https://cloud.google.com/appengine/articles/best-practices-for-app-engine-memcache) diff --git a/appengine/standard/memcache/guestbook/README.md b/appengine/standard/memcache/guestbook/README.md index 55496d13b233..206a9eb920da 100644 --- a/appengine/standard/memcache/guestbook/README.md +++ b/appengine/standard/memcache/guestbook/README.md @@ -1,5 +1,10 @@ # Memcache Guestbook Sample +[![Open in Cloud Shell][shell_img]][shell_link] + +[shell_img]: http://gstatic.com/cloudssh/images/open-btn.png +[shell_link]: https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/GoogleCloudPlatform/python-docs-samples&page=editor&open_in_editor=appengine/standard/memcache/guestbook/README.md + This is a sample app for Google App Engine that demonstrates the Memcache Python API. diff --git a/appengine/standard/modules/README.md b/appengine/standard/modules/README.md index 82bb51d55ff9..663a1ea6fbe8 100644 --- a/appengine/standard/modules/README.md +++ b/appengine/standard/modules/README.md @@ -1,5 +1,10 @@ ## App Engine Modules Docs Snippets +[![Open in Cloud Shell][shell_img]][shell_link] + +[shell_img]: http://gstatic.com/cloudssh/images/open-btn.png +[shell_link]: https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/GoogleCloudPlatform/python-docs-samples&page=editor&open_in_editor=appengine/standard/modules/README.md + This sample application demonstrates how to use Google App Engine's modules API. diff --git a/appengine/standard/multitenancy/README.md b/appengine/standard/multitenancy/README.md index 2b1f4a1688e6..214bf6df8941 100644 --- a/appengine/standard/multitenancy/README.md +++ b/appengine/standard/multitenancy/README.md @@ -1,5 +1,10 @@ # Google App Engine Namespaces +[![Open in Cloud Shell][shell_img]][shell_link] + +[shell_img]: http://gstatic.com/cloudssh/images/open-btn.png +[shell_link]: https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/GoogleCloudPlatform/python-docs-samples&page=editor&open_in_editor=appengine/standard/multitenancy/README.md + This sample demonstrates how to use Google App Engine's [Namespace Manager API](https://cloud.google.com/appengine/docs/python/multitenancy/multitenancy). diff --git a/appengine/standard/ndb/async/README.md b/appengine/standard/ndb/async/README.md index 745e754e6b22..5f84454b150a 100644 --- a/appengine/standard/ndb/async/README.md +++ b/appengine/standard/ndb/async/README.md @@ -1,5 +1,10 @@ ## App Engine Datastore NDB Asynchronous Operations Samples +[![Open in Cloud Shell][shell_img]][shell_link] + +[shell_img]: http://gstatic.com/cloudssh/images/open-btn.png +[shell_link]: https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/GoogleCloudPlatform/python-docs-samples&page=editor&open_in_editor=appengine/standard/ndb/async/README.md + This contains snippets used in the NDB asynchronous operations documentation, demonstrating various ways to make asynchronous ndb operations. diff --git a/appengine/standard/ndb/async/app_toplevel/README.md b/appengine/standard/ndb/async/app_toplevel/README.md index a234077ecf85..cc5257c48f70 100644 --- a/appengine/standard/ndb/async/app_toplevel/README.md +++ b/appengine/standard/ndb/async/app_toplevel/README.md @@ -1,2 +1,7 @@ This is in a separate folder to isolate it from the other apps. + +[![Open in Cloud Shell][shell_img]][shell_link] + +[shell_img]: http://gstatic.com/cloudssh/images/open-btn.png +[shell_link]: https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/GoogleCloudPlatform/python-docs-samples&page=editor&open_in_editor=appengine/standard/ndb/async/app_toplevel/README.md This is necessary because the test won't pass when run with the other tests. diff --git a/appengine/standard/ndb/cache/README.md b/appengine/standard/ndb/cache/README.md index a1df62dae0f1..a702c6478195 100644 --- a/appengine/standard/ndb/cache/README.md +++ b/appengine/standard/ndb/cache/README.md @@ -1,5 +1,10 @@ ## App Engine Datastore NDB Cache Samples +[![Open in Cloud Shell][shell_img]][shell_link] + +[shell_img]: http://gstatic.com/cloudssh/images/open-btn.png +[shell_link]: https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/GoogleCloudPlatform/python-docs-samples&page=editor&open_in_editor=appengine/standard/ndb/cache/README.md + This contains snippets used in the NDB cache documentation, demonstrating various operations on ndb caches. diff --git a/appengine/standard/ndb/entities/README.md b/appengine/standard/ndb/entities/README.md index 2327d33fcc61..31bee0e78446 100644 --- a/appengine/standard/ndb/entities/README.md +++ b/appengine/standard/ndb/entities/README.md @@ -1,5 +1,10 @@ ## App Engine Datastore NDB Entities Samples +[![Open in Cloud Shell][shell_img]][shell_link] + +[shell_img]: http://gstatic.com/cloudssh/images/open-btn.png +[shell_link]: https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/GoogleCloudPlatform/python-docs-samples&page=editor&open_in_editor=appengine/standard/ndb/entities/README.md + This contains snippets used in the NDB entity documentation, demonstrating various operations on ndb entities. diff --git a/appengine/standard/ndb/modeling/README.md b/appengine/standard/ndb/modeling/README.md index 85fd2a34dabc..c13c59bbb044 100644 --- a/appengine/standard/ndb/modeling/README.md +++ b/appengine/standard/ndb/modeling/README.md @@ -1,5 +1,10 @@ ## App Engine Datastore NDB Modeling Samples +[![Open in Cloud Shell][shell_img]][shell_link] + +[shell_img]: http://gstatic.com/cloudssh/images/open-btn.png +[shell_link]: https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/GoogleCloudPlatform/python-docs-samples&page=editor&open_in_editor=appengine/standard/ndb/modeling/README.md + These samples demonstrate how to [model entity relationships](https://cloud.google.com/appengine/articles/modeling) using the Datastore NDB library. Refer to the [App Engine Samples README](../../README.md) for information on how to run and deploy this sample. diff --git a/appengine/standard/ndb/overview/README.md b/appengine/standard/ndb/overview/README.md index 35d6b218e694..2dd7a8aaff58 100644 --- a/appengine/standard/ndb/overview/README.md +++ b/appengine/standard/ndb/overview/README.md @@ -1,5 +1,10 @@ ## App Engine Datastore NDB Overview Sample +[![Open in Cloud Shell][shell_img]][shell_link] + +[shell_img]: http://gstatic.com/cloudssh/images/open-btn.png +[shell_link]: https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/GoogleCloudPlatform/python-docs-samples&page=editor&open_in_editor=appengine/standard/ndb/overview/README.md + This is a sample app for Google App Engine that demonstrates the [Datastore NDB Python API](https://cloud.google.com/appengine/docs/python/ndb/). diff --git a/appengine/standard/ndb/projection_queries/README.md b/appengine/standard/ndb/projection_queries/README.md index 586c2f89efb5..ca2320b82124 100644 --- a/appengine/standard/ndb/projection_queries/README.md +++ b/appengine/standard/ndb/projection_queries/README.md @@ -1,5 +1,10 @@ ## App Engine Datastore NDB Projection Queries Samples +[![Open in Cloud Shell][shell_img]][shell_link] + +[shell_img]: http://gstatic.com/cloudssh/images/open-btn.png +[shell_link]: https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/GoogleCloudPlatform/python-docs-samples&page=editor&open_in_editor=appengine/standard/ndb/projection_queries/README.md + This contains snippets used in the NDB projection queries documentation, demonstrating various ways to make ndb projection queries. diff --git a/appengine/standard/ndb/properties/README.md b/appengine/standard/ndb/properties/README.md index 86532a55c720..a0f6ec2cee94 100644 --- a/appengine/standard/ndb/properties/README.md +++ b/appengine/standard/ndb/properties/README.md @@ -1,5 +1,10 @@ ## App Engine Datastore NDB Properties Samples +[![Open in Cloud Shell][shell_img]][shell_link] + +[shell_img]: http://gstatic.com/cloudssh/images/open-btn.png +[shell_link]: https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/GoogleCloudPlatform/python-docs-samples&page=editor&open_in_editor=appengine/standard/ndb/properties/README.md + This contains snippets used in the NDB properties documentation, demonstrating various operations on ndb properties. diff --git a/appengine/standard/ndb/property_subclasses/README.md b/appengine/standard/ndb/property_subclasses/README.md index 31445c727668..4bb3e2fc3df9 100644 --- a/appengine/standard/ndb/property_subclasses/README.md +++ b/appengine/standard/ndb/property_subclasses/README.md @@ -1,5 +1,10 @@ ## App Engine Datastore NDB Property Subclasses Samples +[![Open in Cloud Shell][shell_img]][shell_link] + +[shell_img]: http://gstatic.com/cloudssh/images/open-btn.png +[shell_link]: https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/GoogleCloudPlatform/python-docs-samples&page=editor&open_in_editor=appengine/standard/ndb/property_subclasses/README.md + This contains snippets used in the NDB property subclasses documentation, demonstrating various operations on ndb property subclasses. diff --git a/appengine/standard/ndb/queries/README.md b/appengine/standard/ndb/queries/README.md index 067655c6674f..1e13adceaa05 100644 --- a/appengine/standard/ndb/queries/README.md +++ b/appengine/standard/ndb/queries/README.md @@ -1,5 +1,10 @@ ## App Engine Datastore NDB Queries Samples +[![Open in Cloud Shell][shell_img]][shell_link] + +[shell_img]: http://gstatic.com/cloudssh/images/open-btn.png +[shell_link]: https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/GoogleCloudPlatform/python-docs-samples&page=editor&open_in_editor=appengine/standard/ndb/queries/README.md + This contains snippets used in the NDB queries documentation, demonstrating various ways to make ndb queries. diff --git a/appengine/standard/ndb/transactions/README.md b/appengine/standard/ndb/transactions/README.md index 78dc33ab2692..30620273f2f4 100644 --- a/appengine/standard/ndb/transactions/README.md +++ b/appengine/standard/ndb/transactions/README.md @@ -1,5 +1,10 @@ ## App Engine Datastore NDB Transactions Sample +[![Open in Cloud Shell][shell_img]][shell_link] + +[shell_img]: http://gstatic.com/cloudssh/images/open-btn.png +[shell_link]: https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/GoogleCloudPlatform/python-docs-samples&page=editor&open_in_editor=appengine/standard/ndb/transactions/README.md + This is a sample app for Google App Engine that demonstrates the [NDB Transactions Python API](https://cloud.google.com/appengine/docs/python/ndb/transactions) This app presents a list of notes. After you submit a note with a particular title, you may not change that note or submit a new note with the same title. There are multiple note pages available. diff --git a/appengine/standard/requests/README.md b/appengine/standard/requests/README.md index 406f912e01c6..5c3ad04397c3 100644 --- a/appengine/standard/requests/README.md +++ b/appengine/standard/requests/README.md @@ -1,5 +1,10 @@ ## App Engine Requests Docs Snippets +[![Open in Cloud Shell][shell_img]][shell_link] + +[shell_img]: http://gstatic.com/cloudssh/images/open-btn.png +[shell_link]: https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/GoogleCloudPlatform/python-docs-samples&page=editor&open_in_editor=appengine/standard/requests/README.md + These snippets demonstrate various aspects of App Engine Python request handling. diff --git a/appengine/standard/sendgrid/README.md b/appengine/standard/sendgrid/README.md index fc4b596d2901..07eb5a32a88a 100644 --- a/appengine/standard/sendgrid/README.md +++ b/appengine/standard/sendgrid/README.md @@ -1,5 +1,10 @@ # Sendgrid & Google App Engine +[![Open in Cloud Shell][shell_img]][shell_link] + +[shell_img]: http://gstatic.com/cloudssh/images/open-btn.png +[shell_link]: https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/GoogleCloudPlatform/python-docs-samples&page=editor&open_in_editor=appengine/standard/sendgrid/README.md + This sample application demonstrates how to use [Sendgrid with Google App Engine](https://cloud.google.com/appengine/docs/python/mail/sendgrid) Refer to the [App Engine Samples README](../../README.md) for information on how to run and deploy this sample. diff --git a/appengine/standard/storage/api-client/README.md b/appengine/standard/storage/api-client/README.md index b934b2f46ab4..ea5e9ed6ea31 100644 --- a/appengine/standard/storage/api-client/README.md +++ b/appengine/standard/storage/api-client/README.md @@ -1,5 +1,10 @@ # Cloud Storage & Google App Engine +[![Open in Cloud Shell][shell_img]][shell_link] + +[shell_img]: http://gstatic.com/cloudssh/images/open-btn.png +[shell_link]: https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/GoogleCloudPlatform/python-docs-samples&page=editor&open_in_editor=appengine/standard/storage/api-client/README.md + This sample demonstrates how to use the [Google Cloud Storage API](https://cloud.google.com/storage/docs/json_api/) from Google App Engine. Refer to the [App Engine Samples README](../README.md) for information on how to run and deploy this sample. diff --git a/appengine/standard/taskqueue/counter/README.md b/appengine/standard/taskqueue/counter/README.md index a0eceab788e8..1fab717e93c0 100644 --- a/appengine/standard/taskqueue/counter/README.md +++ b/appengine/standard/taskqueue/counter/README.md @@ -1,5 +1,10 @@ # App Engine Task Queue Counter +[![Open in Cloud Shell][shell_img]][shell_link] + +[shell_img]: http://gstatic.com/cloudssh/images/open-btn.png +[shell_link]: https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/GoogleCloudPlatform/python-docs-samples&page=editor&open_in_editor=appengine/standard/taskqueue/counter/README.md + To run this app locally, specify both `.yaml` files to `dev_appserver.py`: dev_appserver.py -A your-app-id app.yaml worker.yaml diff --git a/appengine/standard/taskqueue/pull-counter/README.md b/appengine/standard/taskqueue/pull-counter/README.md index ac634800a729..f32cb1b597b1 100644 --- a/appengine/standard/taskqueue/pull-counter/README.md +++ b/appengine/standard/taskqueue/pull-counter/README.md @@ -1,5 +1,10 @@ # App Engine Task Queue Pull Counter +[![Open in Cloud Shell][shell_img]][shell_link] + +[shell_img]: http://gstatic.com/cloudssh/images/open-btn.png +[shell_link]: https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/GoogleCloudPlatform/python-docs-samples&page=editor&open_in_editor=appengine/standard/taskqueue/pull-counter/README.md + These samples are used on the following documentation page: diff --git a/appengine/standard/urlfetch/README.md b/appengine/standard/urlfetch/README.md index 8c78705449e5..aca473b0f99e 100644 --- a/appengine/standard/urlfetch/README.md +++ b/appengine/standard/urlfetch/README.md @@ -1,5 +1,10 @@ ## App Engine UrlFetch Docs Snippets +[![Open in Cloud Shell][shell_img]][shell_link] + +[shell_img]: http://gstatic.com/cloudssh/images/open-btn.png +[shell_link]: https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/GoogleCloudPlatform/python-docs-samples&page=editor&open_in_editor=appengine/standard/urlfetch/README.md + This sample application demonstrates different ways to request a URL on App Engine diff --git a/appengine/standard/xmpp/README.md b/appengine/standard/xmpp/README.md index e6ed91158378..5aae873bda3f 100644 --- a/appengine/standard/xmpp/README.md +++ b/appengine/standard/xmpp/README.md @@ -1,5 +1,10 @@ # Google App Engine XMPP +[![Open in Cloud Shell][shell_img]][shell_link] + +[shell_img]: http://gstatic.com/cloudssh/images/open-btn.png +[shell_link]: https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/GoogleCloudPlatform/python-docs-samples&page=editor&open_in_editor=appengine/standard/xmpp/README.md + This sample includes snippets used in the [App Engine XMPP Docs](https://cloud.google.com/appengine/docs/python/xmpp/). diff --git a/bigquery/api/README.rst b/bigquery/api/README.rst index 2546f180d532..7a1618f7f1ef 100644 --- a/bigquery/api/README.rst +++ b/bigquery/api/README.rst @@ -3,6 +3,10 @@ Google BigQuery Python Samples =============================================================================== +.. image:: https://gstatic.com/cloudssh/images/open-btn.png + :target: https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/GoogleCloudPlatform/python-docs-samples&page=editor&open_in_editor=bigquery/api/README.rst + + This directory contains samples for Google BigQuery. `Google BigQuery`_ is Google's fully managed, petabyte scale, low cost analytics data warehouse. BigQuery is NoOps—there is no infrastructure to manage and you don't need a database administrator—so you can focus on analyzing data to find meaningful insights, use familiar SQL, and take advantage of our pay-as-you-go model. @@ -54,6 +58,10 @@ Samples Getting started +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +.. image:: https://gstatic.com/cloudssh/images/open-btn.png + :target: https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/GoogleCloudPlatform/python-docs-samples&page=editor&open_in_editor=bigquery/api/getting_started.py;bigquery/api/README.rst + + To run this sample: @@ -63,28 +71,33 @@ To run this sample: $ python getting_started.py usage: getting_started.py [-h] project_id - + Command-line application that demonstrates basic BigQuery API usage. - + This sample queries a public shakespeare dataset and displays the 10 of Shakespeare's works with the greatest number of distinct words. - + This sample is used on this page: - + https://cloud.google.com/bigquery/bigquery-api-quickstart - + For more information, see the README.rst. - + positional arguments: project_id Your Google Cloud Project ID. - + optional arguments: -h, --help show this help message and exit + Sync query +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +.. image:: https://gstatic.com/cloudssh/images/open-btn.png + :target: https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/GoogleCloudPlatform/python-docs-samples&page=editor&open_in_editor=bigquery/api/sync_query.py;bigquery/api/README.rst + + To run this sample: @@ -95,15 +108,15 @@ To run this sample: usage: sync_query.py [-h] [-t TIMEOUT] [-r NUM_RETRIES] [-l USE_LEGACY_SQL] project_id query - + Command-line application to perform an synchronous query in BigQuery. - + For more information, see the README.rst. - + positional arguments: project_id Your Google Cloud project ID. query BigQuery SQL Query. - + optional arguments: -h, --help show this help message and exit -t TIMEOUT, --timeout TIMEOUT @@ -115,9 +128,14 @@ To run this sample: syntax. + Async query +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +.. image:: https://gstatic.com/cloudssh/images/open-btn.png + :target: https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/GoogleCloudPlatform/python-docs-samples&page=editor&open_in_editor=bigquery/api/async_query.py;bigquery/api/README.rst + + To run this sample: @@ -129,15 +147,15 @@ To run this sample: usage: async_query.py [-h] [-b] [-r NUM_RETRIES] [-p POLL_INTERVAL] [-l USE_LEGACY_SQL] project_id query - + Command-line application to perform an asynchronous query in BigQuery. - + For more information, see the README.rst. - + positional arguments: project_id Your Google Cloud project ID. query BigQuery SQL Query. - + optional arguments: -h, --help show this help message and exit -b, --batch Run query in batch mode. @@ -150,9 +168,14 @@ To run this sample: syntax. + Listing datasets and projects +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +.. image:: https://gstatic.com/cloudssh/images/open-btn.png + :target: https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/GoogleCloudPlatform/python-docs-samples&page=editor&open_in_editor=bigquery/api/list_datasets_projects.py;bigquery/api/README.rst + + To run this sample: @@ -162,25 +185,30 @@ To run this sample: $ python list_datasets_projects.py usage: list_datasets_projects.py [-h] project_id - + Command-line application to list all projects and datasets in BigQuery. - + This sample is used on this page: - + https://cloud.google.com/bigquery/docs/managing_jobs_datasets_projects - + For more information, see the README.rst. - + positional arguments: project_id the project id to list. - + optional arguments: -h, --help show this help message and exit + Load data by POST +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +.. image:: https://gstatic.com/cloudssh/images/open-btn.png + :target: https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/GoogleCloudPlatform/python-docs-samples&page=editor&open_in_editor=bigquery/api/load_data_by_post.py;bigquery/api/README.rst + + To run this sample: @@ -192,29 +220,34 @@ To run this sample: usage: load_data_by_post.py [-h] project_id dataset_id table_name schema_file data_file - + Command-line application that loads data into BigQuery via HTTP POST. - + This sample is used on this page: - + https://cloud.google.com/bigquery/loading-data-into-bigquery - + For more information, see the README.rst. - + positional arguments: project_id Your Google Cloud project ID. dataset_id A BigQuery dataset ID. table_name Name of the table to load data into. schema_file Path to a schema file describing the table schema. data_file Path to the data file. - + optional arguments: -h, --help show this help message and exit + Load data from CSV +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +.. image:: https://gstatic.com/cloudssh/images/open-btn.png + :target: https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/GoogleCloudPlatform/python-docs-samples&page=editor&open_in_editor=bigquery/api/load_data_from_csv.py;bigquery/api/README.rst + + To run this sample: @@ -226,16 +259,16 @@ To run this sample: usage: load_data_from_csv.py [-h] [-p POLL_INTERVAL] [-r NUM_RETRIES] project_id dataset_id table_name schema_file data_path - + Command-line application that loads data into BigQuery from a CSV file in Google Cloud Storage. - + This sample is used on this page: - + https://cloud.google.com/bigquery/loading-data-into-bigquery#loaddatagcs - + For more information, see the README.rst. - + positional arguments: project_id Your Google Cloud project ID. dataset_id A BigQuery dataset ID. @@ -243,7 +276,7 @@ To run this sample: schema_file Path to a schema file describing the table schema. data_path Google Cloud Storage path to the CSV data, for example: gs://mybucket/in.csv - + optional arguments: -h, --help show this help message and exit -p POLL_INTERVAL, --poll_interval POLL_INTERVAL @@ -252,9 +285,14 @@ To run this sample: Number of times to retry in case of 500 error. + Load streaming data +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +.. image:: https://gstatic.com/cloudssh/images/open-btn.png + :target: https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/GoogleCloudPlatform/python-docs-samples&page=editor&open_in_editor=bigquery/api/streaming.py;bigquery/api/README.rst + + To run this sample: @@ -265,20 +303,20 @@ To run this sample: usage: streaming.py [-h] [-p POLL_INTERVAL] [-r NUM_RETRIES] project_id dataset_id table_name - + Command-line application that streams data into BigQuery. - + This sample is used on this page: - + https://cloud.google.com/bigquery/streaming-data-into-bigquery - + For more information, see the README.rst. - + positional arguments: project_id Your Google Cloud project ID. dataset_id A BigQuery dataset ID. table_name Name of the table to load data into. - + optional arguments: -h, --help show this help message and exit -p POLL_INTERVAL, --poll_interval POLL_INTERVAL @@ -287,9 +325,14 @@ To run this sample: Number of times to retry in case of 500 error. + Export data to Cloud Storage +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +.. image:: https://gstatic.com/cloudssh/images/open-btn.png + :target: https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/GoogleCloudPlatform/python-docs-samples&page=editor&open_in_editor=bigquery/api/export_data_to_cloud_storage.py;bigquery/api/README.rst + + To run this sample: @@ -302,23 +345,23 @@ To run this sample: [-r NUM_RETRIES] [-z] [-f {CSV,NEWLINE_DELIMITED_JSON,AVRO}] project_id dataset_id table_id gcs_path - + Command-line application to export a table from BigQuery to Google Cloud Storage. - + This sample is used on this page: - + https://cloud.google.com/bigquery/exporting-data-from-bigquery - + For more information, see the README.rst. - + positional arguments: project_id Your Google Cloud project ID. dataset_id BigQuery dataset to export. table_id BigQuery table to export. gcs_path Google Cloud Storage path to store the exported data. For example, gs://mybucket/mydata.csv - + optional arguments: -h, --help show this help message and exit -p POLL_INTERVAL, --poll_interval POLL_INTERVAL @@ -330,9 +373,14 @@ To run this sample: output file format + User auth with an installed app +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +.. image:: https://gstatic.com/cloudssh/images/open-btn.png + :target: https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/GoogleCloudPlatform/python-docs-samples&page=editor&open_in_editor=bigquery/api/installed_app.py;bigquery/api/README.rst + + To run this sample: @@ -346,19 +394,19 @@ To run this sample: [--auth_host_port [AUTH_HOST_PORT [AUTH_HOST_PORT ...]]] [--logging_level {DEBUG,INFO,WARNING,ERROR,CRITICAL}] project_id - + Command-line application that demonstrates using BigQuery with credentials obtained from an installed app. - + This sample is used on this page: - + https://cloud.google.com/bigquery/authentication - + For more information, see the README.rst. - + positional arguments: project_id Your Google Cloud Project ID. - + optional arguments: -h, --help show this help message and exit --auth_host_name AUTH_HOST_NAME @@ -373,4 +421,5 @@ To run this sample: + .. _Google Cloud SDK: https://cloud.google.com/sdk/ \ No newline at end of file diff --git a/bigquery/api/README.rst.in b/bigquery/api/README.rst.in index 70ff6ff0e147..d513906040d5 100644 --- a/bigquery/api/README.rst.in +++ b/bigquery/api/README.rst.in @@ -44,3 +44,5 @@ samples: file: installed_app.py show_help: true + +folder: bigquery/api \ No newline at end of file diff --git a/bigquery/cloud-client/README.rst b/bigquery/cloud-client/README.rst index 1a3b889a302d..b0e5810a32ff 100644 --- a/bigquery/cloud-client/README.rst +++ b/bigquery/cloud-client/README.rst @@ -3,6 +3,10 @@ Google BigQuery Python Samples =============================================================================== +.. image:: https://gstatic.com/cloudssh/images/open-btn.png + :target: https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/GoogleCloudPlatform/python-docs-samples&page=editor&open_in_editor=bigquery/cloud-client/README.rst + + This directory contains samples for Google BigQuery. `Google BigQuery`_ is Google's fully managed, petabyte scale, low cost analytics data warehouse. BigQuery is NoOps—there is no infrastructure to manage and you don't need a database administrator—so you can focus on analyzing data to find meaningful insights, use familiar SQL, and take advantage of our pay-as-you-go model. @@ -17,39 +21,20 @@ Setup Authentication ++++++++++++++ -Authentication is typically done through `Application Default Credentials`_, -which means you do not have to change the code to authenticate as long as -your environment has credentials. You have a few options for setting up -authentication: - -#. When running locally, use the `Google Cloud SDK`_ - - .. code-block:: bash - - gcloud auth application-default login - - -#. When running on App Engine or Compute Engine, credentials are already - set-up. However, you may need to configure your Compute Engine instance - with `additional scopes`_. - -#. You can create a `Service Account key file`_. This file can be used to - authenticate to Google Cloud Platform services from any environment. To use - the file, set the ``GOOGLE_APPLICATION_CREDENTIALS`` environment variable to - the path to the key file, for example: - - .. code-block:: bash - - export GOOGLE_APPLICATION_CREDENTIALS=/path/to/service_account.json +This sample requires you to have authentication setup. Refer to the +`Authentication Getting Started Guide`_ for instructions on setting up +credentials for applications. -.. _Application Default Credentials: https://cloud.google.com/docs/authentication#getting_credentials_for_server-centric_flow -.. _additional scopes: https://cloud.google.com/compute/docs/authentication#using -.. _Service Account key file: https://developers.google.com/identity/protocols/OAuth2ServiceAccount#creatinganaccount +.. _Authentication Getting Started Guide: + https://cloud.google.com/docs/authentication/getting-started Install Dependencies ++++++++++++++++++++ -#. Install `pip`_ and `virtualenv`_ if you do not already have them. +#. Install `pip`_ and `virtualenv`_ if you do not already have them. You may want to refer to the `Python Development Environment Setup Guide`_ for Google Cloud Platform for instructions. + + .. _Python Development Environment Setup Guide: + https://cloud.google.com/python/setup #. Create a virtualenv. Samples are compatible with Python 2.7 and 3.4+. @@ -73,6 +58,10 @@ Samples Simple Application +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +.. image:: https://gstatic.com/cloudssh/images/open-btn.png + :target: https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/GoogleCloudPlatform/python-docs-samples&page=editor&open_in_editor=bigquery/cloud-client/simple_app.py;bigquery/cloud-client/README.rst + + To run this sample: @@ -85,6 +74,10 @@ To run this sample: Quickstart +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +.. image:: https://gstatic.com/cloudssh/images/open-btn.png + :target: https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/GoogleCloudPlatform/python-docs-samples&page=editor&open_in_editor=bigquery/cloud-client/quickstart.py;bigquery/cloud-client/README.rst + + To run this sample: @@ -97,6 +90,10 @@ To run this sample: Query +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +.. image:: https://gstatic.com/cloudssh/images/open-btn.png + :target: https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/GoogleCloudPlatform/python-docs-samples&page=editor&open_in_editor=bigquery/cloud-client/query.py;bigquery/cloud-client/README.rst + + To run this sample: @@ -106,23 +103,23 @@ To run this sample: $ python query.py usage: query.py [-h] [--use_standard_sql] - [--destination_table DESTINATION_TABLE] - query - + [--destination_table DESTINATION_TABLE] + query + Command-line application to perform queries in BigQuery. - + For more information, see the README.rst. - + Example invocation: $ python query.py '#standardSQL SELECT corpus FROM `bigquery-public-data.samples.shakespeare` GROUP BY corpus ORDER BY corpus' - + positional arguments: query BigQuery SQL Query. - + optional arguments: -h, --help show this help message and exit --use_standard_sql Use standard SQL syntax. @@ -131,9 +128,14 @@ To run this sample: my_dataset.my_table + Parameterized Query +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +.. image:: https://gstatic.com/cloudssh/images/open-btn.png + :target: https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/GoogleCloudPlatform/python-docs-samples&page=editor&open_in_editor=bigquery/cloud-client/query_params.py;bigquery/cloud-client/README.rst + + To run this sample: @@ -143,15 +145,15 @@ To run this sample: $ python query_params.py usage: query_params.py [-h] {named,positional,array,timestamp,struct} ... - + Command-line app to perform queries with parameters in BigQuery. - + For more information, see the README.rst. - + Example invocation: $ python query_params.py named 'romeoandjuliet' 100 $ python query_params.py positional 'romeoandjuliet' 100 - + positional arguments: {named,positional,array,timestamp,struct} samples @@ -160,14 +162,19 @@ To run this sample: array Run a query with an array parameter. timestamp Run a query with a timestamp parameter. struct Run a query with a struct parameter. - + optional arguments: -h, --help show this help message and exit + Snippets +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +.. image:: https://gstatic.com/cloudssh/images/open-btn.png + :target: https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/GoogleCloudPlatform/python-docs-samples&page=editor&open_in_editor=bigquery/cloud-client/snippets.py;bigquery/cloud-client/README.rst + + To run this sample: @@ -179,16 +186,16 @@ To run this sample: usage: snippets.py [-h] [--project PROJECT] {list-projects,list-datasets,list-tables,create-table,list-rows,copy-table,delete-table} ... - + Samples that demonstrate basic operations in the BigQuery API. - + For more information, see the README.rst. - + Example invocation: $ python snippets.py list-datasets - + The dataset and table should already exist. - + positional arguments: {list-projects,list-datasets,list-tables,create-table,list-rows,copy-table,delete-table} list-projects @@ -212,15 +219,20 @@ To run this sample: currently active project is used. delete-table Deletes a table in a given dataset. If no project is specified, then the currently active project is used. - + optional arguments: -h, --help show this help message and exit --project PROJECT + Load data from a file +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +.. image:: https://gstatic.com/cloudssh/images/open-btn.png + :target: https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/GoogleCloudPlatform/python-docs-samples&page=editor&open_in_editor=bigquery/cloud-client/load_data_from_file.py;bigquery/cloud-client/README.rst + + To run this sample: @@ -230,29 +242,34 @@ To run this sample: $ python load_data_from_file.py usage: load_data_from_file.py [-h] dataset_id table_id source_file_name - + Loads data into BigQuery from a local file. - + For more information, see the README.rst. - + Example invocation: $ python load_data_from_file.py example_dataset example_table \ example-data.csv - + The dataset and table should already exist. - + positional arguments: dataset_id table_id source_file_name Path to a .csv file to upload. - + optional arguments: -h, --help show this help message and exit + Load data from Cloud Storage +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +.. image:: https://gstatic.com/cloudssh/images/open-btn.png + :target: https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/GoogleCloudPlatform/python-docs-samples&page=editor&open_in_editor=bigquery/cloud-client/load_data_from_gcs.py;bigquery/cloud-client/README.rst + + To run this sample: @@ -262,30 +279,35 @@ To run this sample: $ python load_data_from_gcs.py usage: load_data_from_gcs.py [-h] dataset_id table_id source - + Loads data into BigQuery from an object in Google Cloud Storage. - + For more information, see the README.rst. - + Example invocation: $ python load_data_from_gcs.py example_dataset example_table \ gs://example-bucket/example-data.csv - + The dataset and table should already exist. - + positional arguments: dataset_id table_id source The Google Cloud Storage object to load. Must be in the format gs://bucket_name/object_name - + optional arguments: -h, --help show this help message and exit + Load streaming data +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +.. image:: https://gstatic.com/cloudssh/images/open-btn.png + :target: https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/GoogleCloudPlatform/python-docs-samples&page=editor&open_in_editor=bigquery/cloud-client/stream_data.py;bigquery/cloud-client/README.rst + + To run this sample: @@ -295,29 +317,34 @@ To run this sample: $ python stream_data.py usage: stream_data.py [-h] dataset_id table_id json_data - + Loads a single row of data directly into BigQuery. - + For more information, see the README.rst. - + Example invocation: $ python stream_data.py example_dataset example_table \ '["Gandalf", 2000]' - + The dataset and table should already exist. - + positional arguments: dataset_id table_id json_data The row to load into BigQuery as an array in JSON format. - + optional arguments: -h, --help show this help message and exit + Export data to Cloud Storage +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +.. image:: https://gstatic.com/cloudssh/images/open-btn.png + :target: https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/GoogleCloudPlatform/python-docs-samples&page=editor&open_in_editor=bigquery/cloud-client/export_data_to_gcs.py;bigquery/cloud-client/README.rst + + To run this sample: @@ -327,29 +354,30 @@ To run this sample: $ python export_data_to_gcs.py usage: export_data_to_gcs.py [-h] dataset_id table_id destination - + Exports data from BigQuery to an object in Google Cloud Storage. - + For more information, see the README.rst. - + Example invocation: $ python export_data_to_gcs.py example_dataset example_table \ gs://example-bucket/example-data.csv - + The dataset and table should already exist. - + positional arguments: dataset_id table_id destination The destination Google Cloud Storage object. Must be in the format gs://bucket_name/object_name - + optional arguments: -h, --help show this help message and exit + The client library ------------------------------------------------------------------------------- diff --git a/bigquery/cloud-client/README.rst.in b/bigquery/cloud-client/README.rst.in index 61c66ab43c1d..55572c0709ee 100644 --- a/bigquery/cloud-client/README.rst.in +++ b/bigquery/cloud-client/README.rst.in @@ -43,3 +43,5 @@ samples: show_help: true cloud_client_library: true + +folder: bigquery/cloud-client \ No newline at end of file diff --git a/bigquery/rest/README.rst b/bigquery/rest/README.rst index c6b6108e92cc..1108184feb66 100644 --- a/bigquery/rest/README.rst +++ b/bigquery/rest/README.rst @@ -3,6 +3,10 @@ Google BigQuery Python Samples =============================================================================== +.. image:: https://gstatic.com/cloudssh/images/open-btn.png + :target: https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/GoogleCloudPlatform/python-docs-samples&page=editor&open_in_editor=bigquery/rest/README.rst + + This directory contains samples for Google BigQuery. `Google BigQuery`_ is Google's fully managed, petabyte scale, low cost analytics data warehouse. BigQuery is NoOps—there is no infrastructure to manage and you don't need a database administrator—so you can focus on analyzing data to find meaningful insights, use familiar SQL, and take advantage of our pay-as-you-go model. @@ -54,6 +58,10 @@ Samples Label a dataset or table +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +.. image:: https://gstatic.com/cloudssh/images/open-btn.png + :target: https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/GoogleCloudPlatform/python-docs-samples&page=editor&open_in_editor=bigquery/rest/labels.py;bigquery/rest/README.rst + + To run this sample: @@ -64,14 +72,14 @@ To run this sample: usage: labels.py [-h] [--project_id PROJECT_ID] [--table_id TABLE_ID] dataset_id label_key label_value - + Application to add or modify a label on a BigQuery dataset or table. - + positional arguments: dataset_id BigQuery dataset ID. label_key Key for new/modified label. label_value Value for new/modified label. - + optional arguments: -h, --help show this help message and exit --project_id PROJECT_ID @@ -83,4 +91,5 @@ To run this sample: + .. _Google Cloud SDK: https://cloud.google.com/sdk/ \ No newline at end of file diff --git a/bigquery/rest/README.rst.in b/bigquery/rest/README.rst.in index dff76ae74ff8..8acc9bd5c5ed 100644 --- a/bigquery/rest/README.rst.in +++ b/bigquery/rest/README.rst.in @@ -21,3 +21,5 @@ samples: file: labels.py cloud_client_library: false + +folder: bigquery/rest \ No newline at end of file diff --git a/bigtable/hello/README.rst b/bigtable/hello/README.rst index 98a07041af7c..cd472279ba6b 100644 --- a/bigtable/hello/README.rst +++ b/bigtable/hello/README.rst @@ -3,6 +3,10 @@ Google Cloud Bigtable Python Samples =============================================================================== +.. image:: https://gstatic.com/cloudssh/images/open-btn.png + :target: https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/GoogleCloudPlatform/python-docs-samples&page=editor&open_in_editor=bigtable/hello/README.rst + + This directory contains samples for Google Cloud Bigtable. `Google Cloud Bigtable`_ is Google's NoSQL Big Data database service. It's the same database that powers many core Google services, including Search, Analytics, Maps, and Gmail. @@ -54,6 +58,10 @@ Samples Basic example +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +.. image:: https://gstatic.com/cloudssh/images/open-btn.png + :target: https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/GoogleCloudPlatform/python-docs-samples&page=editor&open_in_editor=bigtable/hello/main.py;bigtable/hello/README.rst + + To run this sample: @@ -63,18 +71,18 @@ To run this sample: $ python main.py usage: main.py [-h] [--table TABLE] project_id instance_id - + Demonstrates how to connect to Cloud Bigtable and run some basic operations. Prerequisites: - Create a Cloud Bigtable cluster. https://cloud.google.com/bigtable/docs/creating-cluster - Set your Google Application Default Credentials. https://developers.google.com/identity/protocols/application-default- credentials - + positional arguments: project_id Your Cloud Platform project ID. instance_id ID of the Cloud Bigtable instance to connect to. - + optional arguments: -h, --help show this help message and exit --table TABLE Table to create and destroy. (default: Hello-Bigtable) @@ -82,6 +90,7 @@ To run this sample: + The client library ------------------------------------------------------------------------------- diff --git a/bigtable/hello/README.rst.in b/bigtable/hello/README.rst.in index 7551bc0de7b8..ed9253c115a4 100644 --- a/bigtable/hello/README.rst.in +++ b/bigtable/hello/README.rst.in @@ -19,3 +19,5 @@ samples: show_help: true cloud_client_library: true + +folder: bigtable/hello \ No newline at end of file diff --git a/bigtable/hello_happybase/README.rst b/bigtable/hello_happybase/README.rst index 080c84c34ff3..9c061babd753 100644 --- a/bigtable/hello_happybase/README.rst +++ b/bigtable/hello_happybase/README.rst @@ -3,6 +3,10 @@ Google Cloud Bigtable Python Samples =============================================================================== +.. image:: https://gstatic.com/cloudssh/images/open-btn.png + :target: https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/GoogleCloudPlatform/python-docs-samples&page=editor&open_in_editor=bigtable/hello_happybase/README.rst + + This directory contains samples for Google Cloud Bigtable. `Google Cloud Bigtable`_ is Google's NoSQL Big Data database service. It's the same database that powers many core Google services, including Search, Analytics, Maps, and Gmail. @@ -61,6 +65,10 @@ Samples Basic example +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +.. image:: https://gstatic.com/cloudssh/images/open-btn.png + :target: https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/GoogleCloudPlatform/python-docs-samples&page=editor&open_in_editor=bigtable/hello_happybase/main.py;bigtable/hello_happybase/README.rst + + To run this sample: @@ -70,18 +78,18 @@ To run this sample: $ python main.py usage: main.py [-h] [--table TABLE] project_id instance_id - + Demonstrates how to connect to Cloud Bigtable and run some basic operations. Prerequisites: - Create a Cloud Bigtable cluster. https://cloud.google.com/bigtable/docs/creating-cluster - Set your Google Application Default Credentials. https://developers.google.com/identity/protocols/application-default- credentials - + positional arguments: project_id Your Cloud Platform project ID. instance_id ID of the Cloud Bigtable instance to connect to. - + optional arguments: -h, --help show this help message and exit --table TABLE Table to create and destroy. (default: Hello-Bigtable) @@ -89,6 +97,7 @@ To run this sample: + The client library ------------------------------------------------------------------------------- diff --git a/bigtable/hello_happybase/README.rst.in b/bigtable/hello_happybase/README.rst.in index 4bb363a36cfe..8ef6a956b5e9 100644 --- a/bigtable/hello_happybase/README.rst.in +++ b/bigtable/hello_happybase/README.rst.in @@ -28,3 +28,5 @@ samples: show_help: true cloud_client_library: true + +folder: bigtable/hello_happybase \ No newline at end of file diff --git a/bigtable/metricscaler/README.rst b/bigtable/metricscaler/README.rst index 1a99119ab14f..81ae674ba0ba 100644 --- a/bigtable/metricscaler/README.rst +++ b/bigtable/metricscaler/README.rst @@ -3,6 +3,10 @@ Google Cloud Bigtable Python Samples =============================================================================== +.. image:: https://gstatic.com/cloudssh/images/open-btn.png + :target: https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/GoogleCloudPlatform/python-docs-samples&page=editor&open_in_editor=bigtable/metricscaler/README.rst + + This directory contains samples for Google Cloud Bigtable. `Google Cloud Bigtable`_ is Google's NoSQL Big Data database service. It's the same database that powers many core Google services, including Search, Analytics, Maps, and Gmail. @@ -58,6 +62,10 @@ Samples Metricscaling example +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +.. image:: https://gstatic.com/cloudssh/images/open-btn.png + :target: https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/GoogleCloudPlatform/python-docs-samples&page=editor&open_in_editor=bigtable/metricscaler/metricscaler.py;bigtable/metricscaler/README.rst + + To run this sample: @@ -70,13 +78,13 @@ To run this sample: [--low_cpu_threshold LOW_CPU_THRESHOLD] [--short_sleep SHORT_SLEEP] [--long_sleep LONG_SLEEP] bigtable_instance bigtable_cluster - + Scales Cloud Bigtable clusters based on CPU usage. - + positional arguments: bigtable_instance ID of the Cloud Bigtable instance to connect to. bigtable_cluster ID of the Cloud Bigtable cluster to connect to. - + optional arguments: -h, --help show this help message and exit --high_cpu_threshold HIGH_CPU_THRESHOLD @@ -95,6 +103,7 @@ To run this sample: + The client library ------------------------------------------------------------------------------- diff --git a/bigtable/metricscaler/README.rst.in b/bigtable/metricscaler/README.rst.in index 09b1a295a489..44a548e4c1fb 100644 --- a/bigtable/metricscaler/README.rst.in +++ b/bigtable/metricscaler/README.rst.in @@ -25,3 +25,5 @@ samples: show_help: true cloud_client_library: true + +folder: bigtable/metricscaler \ No newline at end of file diff --git a/blog/README.md b/blog/README.md index 90eb34d19222..f049214024c9 100644 --- a/blog/README.md +++ b/blog/README.md @@ -1,5 +1,10 @@ # Blog Sample Code +[![Open in Cloud Shell][shell_img]][shell_link] + +[shell_img]: http://gstatic.com/cloudssh/images/open-btn.png +[shell_link]: https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/GoogleCloudPlatform/python-docs-samples&page=editor&open_in_editor=blog/README.md + This directory contains samples used in the [Cloud Platform Blog](http://cloud.google.com/blog). Each sample should have a readme with instructions and a link to its respective blog post. diff --git a/blog/introduction_to_data_models_in_cloud_datastore/README.md b/blog/introduction_to_data_models_in_cloud_datastore/README.md index 1a05cc43036c..e21c418ad713 100644 --- a/blog/introduction_to_data_models_in_cloud_datastore/README.md +++ b/blog/introduction_to_data_models_in_cloud_datastore/README.md @@ -1,5 +1,10 @@ # Introduction to data models in Cloud Datastore +[![Open in Cloud Shell][shell_img]][shell_link] + +[shell_img]: http://gstatic.com/cloudssh/images/open-btn.png +[shell_link]: https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/GoogleCloudPlatform/python-docs-samples&page=editor&open_in_editor=blog/introduction_to_data_models_in_cloud_datastore/README.md + This sample code is used in [this blog post](http://googlecloudplatform.blogspot.com/2015/08/Introduction-to-data-models-in-Cloud-Datastore.html). It demonstrates two data models using [Google Cloud Datastore](https://cloud.google.com/datastore). diff --git a/codelabs/flex_and_vision/README.md b/codelabs/flex_and_vision/README.md index 97c32dd6a213..bbfc45e5d51f 100644 --- a/codelabs/flex_and_vision/README.md +++ b/codelabs/flex_and_vision/README.md @@ -1,5 +1,10 @@ # Python Google Cloud Vision sample for Google App Engine Flexible Environment +[![Open in Cloud Shell][shell_img]][shell_link] + +[shell_img]: http://gstatic.com/cloudssh/images/open-btn.png +[shell_link]: https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/GoogleCloudPlatform/python-docs-samples&page=editor&open_in_editor=codelabs/flex_and_vision/README.md + This sample demonstrates how to use the [Google Cloud Vision API](https://cloud.google.com/vision/), [Google Cloud Storage](https://cloud.google.com/storage/), and [Google Cloud Datastore](https://cloud.google.com/datastore/) on [Google App Engine Flexible Environment](https://cloud.google.com/appengine). ## Setup diff --git a/compute/README.md b/compute/README.md index 02d800fc5638..3eb22ea4512a 100644 --- a/compute/README.md +++ b/compute/README.md @@ -1,5 +1,10 @@ # Google Compute Engine Samples +[![Open in Cloud Shell][shell_img]][shell_link] + +[shell_img]: http://gstatic.com/cloudssh/images/open-btn.png +[shell_link]: https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/GoogleCloudPlatform/python-docs-samples&page=editor&open_in_editor=compute/README.md + This section contains samples for [Google Compute Engine](https://cloud.google.com/compute). ## Running the samples diff --git a/compute/api/README.md b/compute/api/README.md index c29c06dcf4bd..757a4a2a79a8 100644 --- a/compute/api/README.md +++ b/compute/api/README.md @@ -1,5 +1,10 @@ # Compute Engine API Samples +[![Open in Cloud Shell][shell_img]][shell_link] + +[shell_img]: http://gstatic.com/cloudssh/images/open-btn.png +[shell_link]: https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/GoogleCloudPlatform/python-docs-samples&page=editor&open_in_editor=compute/api/README.md + These samples are used on the following documentation pages: diff --git a/compute/metadata/README.md b/compute/metadata/README.md index 8e03bb3eeb2d..fdb92240af2d 100644 --- a/compute/metadata/README.md +++ b/compute/metadata/README.md @@ -1,5 +1,10 @@ # Compute Engine Metadata Samples +[![Open in Cloud Shell][shell_img]][shell_link] + +[shell_img]: http://gstatic.com/cloudssh/images/open-btn.png +[shell_link]: https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/GoogleCloudPlatform/python-docs-samples&page=editor&open_in_editor=compute/metadata/README.md + These samples demonstrate interacting with the Compute Engine metadata service. These samples must be run on Compute Engine. diff --git a/compute/xmpp_wikibot/README.md b/compute/xmpp_wikibot/README.md index 49e655eb2561..e1dd45ecd563 100644 --- a/compute/xmpp_wikibot/README.md +++ b/compute/xmpp_wikibot/README.md @@ -1,5 +1,10 @@ # Wikibot example that can be run on Google Compute Engine +[![Open in Cloud Shell][shell_img]][shell_link] + +[shell_img]: http://gstatic.com/cloudssh/images/open-btn.png +[shell_link]: https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/GoogleCloudPlatform/python-docs-samples&page=editor&open_in_editor=compute/xmpp_wikibot/README.md + This sample shows how to use the [SleekXMPP](http://sleekxmpp.com/index.html) client and [Flask](http://flask.pocoo.org/) to build a simple chatbot that can be run on [Google Compute Engine](https://cloud.google.com/compute/). The diff --git a/container_engine/api-client/README.rst b/container_engine/api-client/README.rst index d3bb6ef90c99..f60ff7288e6c 100644 --- a/container_engine/api-client/README.rst +++ b/container_engine/api-client/README.rst @@ -3,6 +3,10 @@ Google Container Engine Python Samples =============================================================================== +.. image:: https://gstatic.com/cloudssh/images/open-btn.png + :target: https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/GoogleCloudPlatform/python-docs-samples&page=editor&open_in_editor=container_engine/api-client/README.rst + + This directory contains samples for Google Container Engine. `Google Container Engine`_ runs Docker containers on Google Cloud Platform, powered by Kubernetes. @@ -54,6 +58,10 @@ Samples Snippets +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +.. image:: https://gstatic.com/cloudssh/images/open-btn.png + :target: https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/GoogleCloudPlatform/python-docs-samples&page=editor&open_in_editor=container_engine/api-client/snippets.py;container_engine/api-client/README.rst + + To run this sample: @@ -63,16 +71,17 @@ To run this sample: $ python snippets.py usage: snippets.py [-h] {list_clusters_and_nodepools} ... - + positional arguments: {list_clusters_and_nodepools} list_clusters_and_nodepools Lists all clusters and associated node pools. - + optional arguments: -h, --help show this help message and exit + .. _Google Cloud SDK: https://cloud.google.com/sdk/ \ No newline at end of file diff --git a/container_engine/api-client/README.rst.in b/container_engine/api-client/README.rst.in index 4dfbf71fd75f..c729b78e815e 100644 --- a/container_engine/api-client/README.rst.in +++ b/container_engine/api-client/README.rst.in @@ -16,3 +16,5 @@ samples: - name: Snippets file: snippets.py show_help: true + +folder: container_engine/api-client \ No newline at end of file diff --git a/container_engine/django_tutorial/README.md b/container_engine/django_tutorial/README.md index 9808e5fc8e6b..1d45703e2b8d 100644 --- a/container_engine/django_tutorial/README.md +++ b/container_engine/django_tutorial/README.md @@ -1,5 +1,10 @@ # Getting started with Django on Google Container Engine +[![Open in Cloud Shell][shell_img]][shell_link] + +[shell_img]: http://gstatic.com/cloudssh/images/open-btn.png +[shell_link]: https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/GoogleCloudPlatform/python-docs-samples&page=editor&open_in_editor=container_engine/django_tutorial/README.md + This repository is an example of how to run a [Django](https://www.djangoproject.com/) app on Google Container Engine. It uses the [Writing your first Django app](https://docs.djangoproject.com/en/1.11/intro/tutorial01/) diff --git a/dataproc/README.md b/dataproc/README.md index ab38fbac6f66..1d919e4631d3 100644 --- a/dataproc/README.md +++ b/dataproc/README.md @@ -1,5 +1,10 @@ # Cloud Dataproc API Example +[![Open in Cloud Shell][shell_img]][shell_link] + +[shell_img]: http://gstatic.com/cloudssh/images/open-btn.png +[shell_link]: https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/GoogleCloudPlatform/python-docs-samples&page=editor&open_in_editor=dataproc/README.md + Sample command-line programs for interacting with the Cloud Dataproc API. diff --git a/datastore/cloud-client/README.rst b/datastore/cloud-client/README.rst index a874286d6620..4fcb7406081b 100644 --- a/datastore/cloud-client/README.rst +++ b/datastore/cloud-client/README.rst @@ -3,6 +3,10 @@ Google Cloud Datastore Python Samples =============================================================================== +.. image:: https://gstatic.com/cloudssh/images/open-btn.png + :target: https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/GoogleCloudPlatform/python-docs-samples&page=editor&open_in_editor=datastore/cloud-client/README.rst + + This directory contains samples for Google Cloud Datastore. `Google Cloud Datastore`_ is a NoSQL document database built for automatic scaling, high performance, and ease of application development. @@ -54,6 +58,10 @@ Samples Quickstart +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +.. image:: https://gstatic.com/cloudssh/images/open-btn.png + :target: https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/GoogleCloudPlatform/python-docs-samples&page=editor&open_in_editor=datastore/cloud-client/quickstart.py;datastore/cloud-client/README.rst + + To run this sample: @@ -66,6 +74,10 @@ To run this sample: Tasks example app +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +.. image:: https://gstatic.com/cloudssh/images/open-btn.png + :target: https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/GoogleCloudPlatform/python-docs-samples&page=editor&open_in_editor=datastore/cloud-client/tasks.py;datastore/cloud-client/README.rst + + To run this sample: @@ -78,6 +90,10 @@ To run this sample: Snippets +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +.. image:: https://gstatic.com/cloudssh/images/open-btn.png + :target: https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/GoogleCloudPlatform/python-docs-samples&page=editor&open_in_editor=datastore/cloud-client/snippets.py;datastore/cloud-client/README.rst + + To run this sample: @@ -87,18 +103,19 @@ To run this sample: $ python snippets.py usage: snippets.py [-h] project_id - + Demonstrates datastore API operations. - + positional arguments: project_id Your cloud project ID. - + optional arguments: -h, --help show this help message and exit + The client library ------------------------------------------------------------------------------- diff --git a/datastore/cloud-client/README.rst.in b/datastore/cloud-client/README.rst.in index 29bf4c53ec25..aeda020c25ae 100644 --- a/datastore/cloud-client/README.rst.in +++ b/datastore/cloud-client/README.rst.in @@ -22,3 +22,5 @@ samples: show_help: true cloud_client_library: true + +folder: datastore/cloud-client \ No newline at end of file diff --git a/dns/api/README.rst b/dns/api/README.rst index 88b40bf0710f..8655daa596ff 100644 --- a/dns/api/README.rst +++ b/dns/api/README.rst @@ -3,6 +3,10 @@ Google Cloud DNS Python Samples =============================================================================== +.. image:: https://gstatic.com/cloudssh/images/open-btn.png + :target: https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/GoogleCloudPlatform/python-docs-samples&page=editor&open_in_editor=dns/api/README.rst + + This directory contains samples for Google Cloud DNS. `Google Cloud DNS`_ allows you publish your domain names using Google's infrastructure for production-quality, high-volume DNS services. Google's global network of anycast name servers provide reliable, low-latency authoritative name lookups for your domains from anywhere in the world. @@ -54,6 +58,10 @@ Samples Snippets +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +.. image:: https://gstatic.com/cloudssh/images/open-btn.png + :target: https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/GoogleCloudPlatform/python-docs-samples&page=editor&open_in_editor=dns/api/main.py;dns/api/README.rst + + To run this sample: diff --git a/dns/api/README.rst.in b/dns/api/README.rst.in index f321135c76bb..25c6d852d3f9 100644 --- a/dns/api/README.rst.in +++ b/dns/api/README.rst.in @@ -20,3 +20,5 @@ samples: file: main.py cloud_client_library: true + +folder: dns/api \ No newline at end of file diff --git a/endpoints/bookstore-grpc/README.md b/endpoints/bookstore-grpc/README.md index 2f413a2a9eed..3d543029609e 100644 --- a/endpoints/bookstore-grpc/README.md +++ b/endpoints/bookstore-grpc/README.md @@ -1,5 +1,10 @@ # Google Cloud Endpoints Bookstore App in Python +[![Open in Cloud Shell][shell_img]][shell_link] + +[shell_img]: http://gstatic.com/cloudssh/images/open-btn.png +[shell_link]: https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/GoogleCloudPlatform/python-docs-samples&page=editor&open_in_editor=endpoints/bookstore-grpc/README.md + ## Installing the dependencies using virtualenv: virtualenv bookstore-env diff --git a/endpoints/getting-started-grpc/README.md b/endpoints/getting-started-grpc/README.md index 50f85f353de2..38727b380d55 100644 --- a/endpoints/getting-started-grpc/README.md +++ b/endpoints/getting-started-grpc/README.md @@ -1,5 +1,10 @@ # Endpoints Getting Started with gRPC & Python Quickstart +[![Open in Cloud Shell][shell_img]][shell_link] + +[shell_img]: http://gstatic.com/cloudssh/images/open-btn.png +[shell_link]: https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/GoogleCloudPlatform/python-docs-samples&page=editor&open_in_editor=endpoints/getting-started-grpc/README.md + It is assumed that you have a working Python environment and a Google Cloud account and [SDK](https://cloud.google.com/sdk/) configured. diff --git a/endpoints/getting-started/README.md b/endpoints/getting-started/README.md index cc3896f2185d..e85b4804cbb1 100644 --- a/endpoints/getting-started/README.md +++ b/endpoints/getting-started/README.md @@ -1,5 +1,10 @@ # Google Cloud Endpoints & Python +[![Open in Cloud Shell][shell_img]][shell_link] + +[shell_img]: http://gstatic.com/cloudssh/images/open-btn.png +[shell_link]: https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/GoogleCloudPlatform/python-docs-samples&page=editor&open_in_editor=endpoints/getting-started/README.md + This sample demonstrates how to use Google Cloud Endpoints using Python. For a complete walkthrough showing how to run this sample in different diff --git a/endpoints/kubernetes/README.md b/endpoints/kubernetes/README.md index 3ee989375f19..8b315d41ac35 100644 --- a/endpoints/kubernetes/README.md +++ b/endpoints/kubernetes/README.md @@ -1,2 +1,7 @@ # Kubernetes Configuration Example for running Cloud Endpoints with gRPC Bookstore Backend +[![Open in Cloud Shell][shell_img]][shell_link] + +[shell_img]: http://gstatic.com/cloudssh/images/open-btn.png +[shell_link]: https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/GoogleCloudPlatform/python-docs-samples&page=editor&open_in_editor=endpoints/kubernetes/README.md + diff --git a/error_reporting/api/README.rst b/error_reporting/api/README.rst index 5f662b8fc8b3..c58987171d42 100644 --- a/error_reporting/api/README.rst +++ b/error_reporting/api/README.rst @@ -3,6 +3,10 @@ Stackdriver Error Reporting Python Samples =============================================================================== +.. image:: https://gstatic.com/cloudssh/images/open-btn.png + :target: https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/GoogleCloudPlatform/python-docs-samples&page=editor&open_in_editor=error_reporting/api/README.rst + + This directory contains samples for Stackdriver Error Reporting. `Stackdriver Error Reporting`_ aggregates and displays errors produced in your running cloud services. @@ -55,6 +59,10 @@ Samples Report Exception +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +.. image:: https://gstatic.com/cloudssh/images/open-btn.png + :target: https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/GoogleCloudPlatform/python-docs-samples&page=editor&open_in_editor=error_reporting/api/report_exception.py;error_reporting/api/README.rst + + To run this sample: diff --git a/error_reporting/api/README.rst.in b/error_reporting/api/README.rst.in index 4eeab4bbebac..ac60cc80c81a 100644 --- a/error_reporting/api/README.rst.in +++ b/error_reporting/api/README.rst.in @@ -17,3 +17,5 @@ samples: file: report_exception.py cloud_client_library: true + +folder: error_reporting/api \ No newline at end of file diff --git a/error_reporting/fluent_on_compute/README.md b/error_reporting/fluent_on_compute/README.md index 4c9a24c60dc4..d3a58c167d82 100644 --- a/error_reporting/fluent_on_compute/README.md +++ b/error_reporting/fluent_on_compute/README.md @@ -1,5 +1,10 @@ # Google Error Reorting Samples Samples +[![Open in Cloud Shell][shell_img]][shell_link] + +[shell_img]: http://gstatic.com/cloudssh/images/open-btn.png +[shell_link]: https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/GoogleCloudPlatform/python-docs-samples&page=editor&open_in_editor=error_reporting/fluent_on_compute/README.md + This section contains samples for [Google Cloud Error Reporting](https://cloud.google.com/error-reporting). A startup script has been provided to demonstrated how to properly provision a GCE diff --git a/iap/README.md b/iap/README.md index aea66347672c..630ea8dcd9bf 100644 --- a/iap/README.md +++ b/iap/README.md @@ -1,5 +1,10 @@ # Identity-Aware Proxy Samples +[![Open in Cloud Shell][shell_img]][shell_link] + +[shell_img]: http://gstatic.com/cloudssh/images/open-btn.png +[shell_link]: https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/GoogleCloudPlatform/python-docs-samples&page=editor&open_in_editor=iap/README.md + These samples are used on the following documentation pages: diff --git a/iot/api-client/README.md b/iot/api-client/README.md index e096490c63ad..f3781654da86 100644 --- a/iot/api-client/README.md +++ b/iot/api-client/README.md @@ -1,4 +1,9 @@ # Cloud IoT Core Python Samples + +[![Open in Cloud Shell][shell_img]][shell_link] + +[shell_img]: http://gstatic.com/cloudssh/images/open-btn.png +[shell_link]: https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/GoogleCloudPlatform/python-docs-samples&page=editor&open_in_editor=iot/api-client/README.md This folder contains Python samples that demonstrate an overview of the Google Cloud IoT Core platform. diff --git a/iot/api-client/http_example/README.rst b/iot/api-client/http_example/README.rst index ed797284e5f6..4b02f763e67c 100644 --- a/iot/api-client/http_example/README.rst +++ b/iot/api-client/http_example/README.rst @@ -3,6 +3,10 @@ Google Cloud IoT Core API Python Samples =============================================================================== +.. image:: https://gstatic.com/cloudssh/images/open-btn.png + :target: https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/GoogleCloudPlatform/python-docs-samples&page=editor&open_in_editor=iot/api-client/http_example/README.rst + + This directory contains samples for Google Cloud IoT Core API. `Google Cloud IoT Core`_ allows developers to easily integrate Publish and Subscribe functionality with devices and programmatically manage device authorization. The following example runs the sample using the project ID `blue-jet-123` and the device name `my-python-device`: @@ -53,6 +57,10 @@ Samples HTTP Device Client Example +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +.. image:: https://gstatic.com/cloudssh/images/open-btn.png + :target: https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/GoogleCloudPlatform/python-docs-samples&page=editor&open_in_editor=iot/api-client/http_example/cloudiot_http_example.py;iot/api-client/http_example/README.rst + + To run this sample: @@ -70,9 +78,9 @@ To run this sample: [--num_messages NUM_MESSAGES] --message_type {event,state} [--base_url BASE_URL] [--jwt_expires_minutes JWT_EXPIRES_MINUTES] - + Example Google Cloud IoT Core HTTP device connection code. - + optional arguments: -h, --help show this help message and exit --project_id PROJECT_ID @@ -100,4 +108,5 @@ To run this sample: + .. _Google Cloud SDK: https://cloud.google.com/sdk/ \ No newline at end of file diff --git a/iot/api-client/http_example/README.rst.in b/iot/api-client/http_example/README.rst.in index 0a5c9b22149d..7fafd1049dda 100644 --- a/iot/api-client/http_example/README.rst.in +++ b/iot/api-client/http_example/README.rst.in @@ -29,3 +29,5 @@ samples: show_help: True cloud_client_library: false + +folder: iot/api-client/http_example \ No newline at end of file diff --git a/iot/api-client/manager/README.rst b/iot/api-client/manager/README.rst index 03ec72937a55..dde4789c05c3 100644 --- a/iot/api-client/manager/README.rst +++ b/iot/api-client/manager/README.rst @@ -3,6 +3,10 @@ Google Cloud IoT Core API Python Samples =============================================================================== +.. image:: https://gstatic.com/cloudssh/images/open-btn.png + :target: https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/GoogleCloudPlatform/python-docs-samples&page=editor&open_in_editor=iot/api-client/manager/README.rst + + This directory contains samples for Google Cloud IoT Core API. `Google Cloud IoT Core`_ allows developers to easily integrate Publish and Subscribe functionality with devices and programmatically manage device authorization. @@ -54,6 +58,10 @@ Samples Manager +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +.. image:: https://gstatic.com/cloudssh/images/open-btn.png + :target: https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/GoogleCloudPlatform/python-docs-samples&page=editor&open_in_editor=iot/api-client/manager/manager.py;iot/api-client/manager/README.rst + + To run this sample: @@ -70,12 +78,12 @@ To run this sample: [--registry_id REGISTRY_ID] [--device_id DEVICE_ID] {create-es256,create-registry,create-rsa256,create-topic,create-unauth,delete-device,delete-registry,get,get-registry,get-state,list,list-registries,patch-es256,patch-rs256} ... - + Example of using the Google Cloud IoT Core device manager to administer devices. - + Usage example: - + python manager.py \ --project_id=my-project-id \ --pubsub_topic=projects/my-project-id/topics/my-topic-id \ @@ -83,7 +91,7 @@ To run this sample: --rsa_certificate_file=../rsa_cert.pem \ --service_account_json=$HOME/service_account.json list - + positional arguments: {create-es256,create-registry,create-rsa256,create-topic,create-unauth,delete-device,delete-registry,get,get-registry,get-state,list,list-registries,patch-es256,patch-rs256} create-es256 Create a new device with the given id, using ES256 for @@ -105,7 +113,7 @@ To run this sample: device. patch-rs256 Patch the device to add an RSA256 public key to the device. - + optional arguments: -h, --help show this help message and exit --pubsub_topic PUBSUB_TOPIC @@ -129,4 +137,5 @@ To run this sample: + .. _Google Cloud SDK: https://cloud.google.com/sdk/ \ No newline at end of file diff --git a/iot/api-client/manager/README.rst.in b/iot/api-client/manager/README.rst.in index 27ca855bbfac..b019a4cc02b0 100644 --- a/iot/api-client/manager/README.rst.in +++ b/iot/api-client/manager/README.rst.in @@ -19,3 +19,5 @@ samples: show_help: True cloud_client_library: false + +folder: iot/api-client/manager \ No newline at end of file diff --git a/iot/api-client/manager/resources/README.md b/iot/api-client/manager/resources/README.md index ba272ccaf74f..20a0344f958a 100644 --- a/iot/api-client/manager/resources/README.md +++ b/iot/api-client/manager/resources/README.md @@ -1,4 +1,9 @@ # Test public certificate files +[![Open in Cloud Shell][shell_img]][shell_link] + +[shell_img]: http://gstatic.com/cloudssh/images/open-btn.png +[shell_link]: https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/GoogleCloudPlatform/python-docs-samples&page=editor&open_in_editor=iot/api-client/manager/resources/README.md + The public certificates in this folder are only provided for testing and should not be used for registering your devices. diff --git a/iot/api-client/mqtt_example/README.rst b/iot/api-client/mqtt_example/README.rst index 64458a487653..eff574da25c4 100644 --- a/iot/api-client/mqtt_example/README.rst +++ b/iot/api-client/mqtt_example/README.rst @@ -3,6 +3,10 @@ Google Cloud IoT Core API Python Samples =============================================================================== +.. image:: https://gstatic.com/cloudssh/images/open-btn.png + :target: https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/GoogleCloudPlatform/python-docs-samples&page=editor&open_in_editor=iot/api-client/mqtt_example/README.rst + + This directory contains samples for Google Cloud IoT Core API. `Google Cloud IoT Core`_ allows developers to easily integrate Publish and Subscribe functionality with devices and programmatically manage device authorization. Before you run the sample, you must retrieve the Google root certificate. For example, `wget https://pki.goog/roots.pem` or `curl https://pki.goog/roots.pem > roots.pem`. The following example runs the sample using the project ID `blue-jet-123` and the device name `my-python-device`: @@ -53,6 +57,10 @@ Samples MQTT Device Client Example +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +.. image:: https://gstatic.com/cloudssh/images/open-btn.png + :target: https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/GoogleCloudPlatform/python-docs-samples&page=editor&open_in_editor=iot/api-client/mqtt_example/cloudiot_mqtt_example.py;iot/api-client/mqtt_example/README.rst + + To run this sample: diff --git a/iot/api-client/mqtt_example/README.rst.in b/iot/api-client/mqtt_example/README.rst.in index dc95d1e0e206..be0e806e1910 100644 --- a/iot/api-client/mqtt_example/README.rst.in +++ b/iot/api-client/mqtt_example/README.rst.in @@ -32,3 +32,5 @@ samples: show_help: True cloud_client_library: false + +folder: iot/api-client/mqtt_example \ No newline at end of file diff --git a/iot/api-client/scripts/README.rst b/iot/api-client/scripts/README.rst index fa6fa61729e9..ee82c532e549 100644 --- a/iot/api-client/scripts/README.rst +++ b/iot/api-client/scripts/README.rst @@ -3,6 +3,10 @@ Google Cloud IoT Core Python Samples =============================================================================== +.. image:: https://gstatic.com/cloudssh/images/open-btn.png + :target: https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/GoogleCloudPlatform/python-docs-samples&page=editor&open_in_editor=iot/api-client/scripts/README.rst + + This directory contains samples for Google Cloud IoT Core. `Google Cloud IoT Core`_ is a fully-managed, globally distributed solution for managing devices and sending / receiving messages from devices. Set the `GOOGLE_CLOUD_PROJECT` environment variable and call the script with your topic ID. @@ -54,6 +58,10 @@ Samples PubSub helper +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +.. image:: https://gstatic.com/cloudssh/images/open-btn.png + :target: https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/GoogleCloudPlatform/python-docs-samples&page=editor&open_in_editor=iot/api-client/scripts/iam.py;iot/api-client/scripts/README.rst + + To run this sample: @@ -63,21 +71,22 @@ To run this sample: $ python iam.py usage: iam.py [-h] topic_name - + This application demonstrates how programatically grant access to the Cloud IoT Core service account on a given PubSub topic. - + For more information, see https://cloud.google.com/iot. - + positional arguments: topic_name The PubSub topic to grant Cloud IoT Core access to - + optional arguments: -h, --help show this help message and exit + The client library ------------------------------------------------------------------------------- diff --git a/iot/api-client/scripts/README.rst.in b/iot/api-client/scripts/README.rst.in index dfd077ff41b5..75df8d46f25e 100644 --- a/iot/api-client/scripts/README.rst.in +++ b/iot/api-client/scripts/README.rst.in @@ -20,3 +20,5 @@ samples: show_help: true cloud_client_library: true + +folder: iot/api-client/scripts \ No newline at end of file diff --git a/kms/api-client/README.rst b/kms/api-client/README.rst index 410fa8da1d45..8fdace9c3e66 100644 --- a/kms/api-client/README.rst +++ b/kms/api-client/README.rst @@ -3,6 +3,10 @@ Google Cloud KMS API Python Samples =============================================================================== +.. image:: https://gstatic.com/cloudssh/images/open-btn.png + :target: https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/GoogleCloudPlatform/python-docs-samples&page=editor&open_in_editor=kms/api-client/README.rst + + This directory contains samples for Google Cloud KMS API. The `Google Cloud KMS API`_ is a service that allows you to keep encryption keys centrally in the cloud, for direct use by cloud services. @@ -54,6 +58,10 @@ Samples Quickstart +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +.. image:: https://gstatic.com/cloudssh/images/open-btn.png + :target: https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/GoogleCloudPlatform/python-docs-samples&page=editor&open_in_editor=kms/api-client/quickstart.py;kms/api-client/README.rst + + To run this sample: @@ -66,6 +74,10 @@ To run this sample: Snippets +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +.. image:: https://gstatic.com/cloudssh/images/open-btn.png + :target: https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/GoogleCloudPlatform/python-docs-samples&page=editor&open_in_editor=kms/api-client/snippets.py;kms/api-client/README.rst + + To run this sample: @@ -75,16 +87,17 @@ To run this sample: $ python snippets.py usage: snippets.py [-h] - {create_key_ring,create_crypto_key,encrypt,decrypt,disable_crypto_key_version,destroy_crypto_key_version,add_member_to_crypto_key_policy,get_key_ring_policy} + {create_key_ring,create_crypto_key,encrypt,decrypt,disable_crypto_key_version,enable_crypto_key_version,destroy_crypto_key_version,restore_crypto_key_version,add_member_to_crypto_key_policy,get_key_ring_policy} ... - + positional arguments: - {create_key_ring,create_crypto_key,encrypt,decrypt,disable_crypto_key_version,destroy_crypto_key_version,add_member_to_crypto_key_policy,get_key_ring_policy} - + {create_key_ring,create_crypto_key,encrypt,decrypt,disable_crypto_key_version,enable_crypto_key_version,destroy_crypto_key_version,restore_crypto_key_version,add_member_to_crypto_key_policy,get_key_ring_policy} + optional arguments: -h, --help show this help message and exit + .. _Google Cloud SDK: https://cloud.google.com/sdk/ \ No newline at end of file diff --git a/kms/api-client/README.rst.in b/kms/api-client/README.rst.in index 9489051c2c63..6299b5a0a535 100644 --- a/kms/api-client/README.rst.in +++ b/kms/api-client/README.rst.in @@ -18,3 +18,5 @@ samples: - name: Snippets file: snippets.py show_help: True + +folder: kms/api-client \ No newline at end of file diff --git a/language/README.md b/language/README.md index 1e4a6401bbd8..d0ba56915559 100644 --- a/language/README.md +++ b/language/README.md @@ -1,5 +1,10 @@ # Google Cloud Natural Language API examples +[![Open in Cloud Shell][shell_img]][shell_link] + +[shell_img]: http://gstatic.com/cloudssh/images/open-btn.png +[shell_link]: https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/GoogleCloudPlatform/python-docs-samples&page=editor&open_in_editor=language/README.md + This directory contains Python examples that use the [Google Cloud Natural Language API](https://cloud.google.com/natural-language/). diff --git a/language/api/README.rst b/language/api/README.rst index e97059a3919c..7434de167bcc 100644 --- a/language/api/README.rst +++ b/language/api/README.rst @@ -3,6 +3,10 @@ Google Cloud Natural Language API Python Samples =============================================================================== +.. image:: https://gstatic.com/cloudssh/images/open-btn.png + :target: https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/GoogleCloudPlatform/python-docs-samples&page=editor&open_in_editor=language/api/README.rst + + This directory contains samples for Google Cloud Natural Language API. The `Google Cloud Natural Language API`_ provides natural language understanding technologies to developers, including sentiment analysis, entity recognition, and syntax analysis. This API is part of the larger Cloud Machine Learning API. @@ -54,6 +58,10 @@ Samples Analyze syntax +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +.. image:: https://gstatic.com/cloudssh/images/open-btn.png + :target: https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/GoogleCloudPlatform/python-docs-samples&page=editor&open_in_editor=language/api/analyze.py;language/api/README.rst + + To run this sample: @@ -63,17 +71,18 @@ To run this sample: $ python analyze.py usage: analyze.py [-h] {entities,sentiment,syntax} text - + Analyzes text using the Google Cloud Natural Language API. - + positional arguments: {entities,sentiment,syntax} text - + optional arguments: -h, --help show this help message and exit + .. _Google Cloud SDK: https://cloud.google.com/sdk/ \ No newline at end of file diff --git a/language/api/README.rst.in b/language/api/README.rst.in index 31294fae1960..f3195edf6b42 100644 --- a/language/api/README.rst.in +++ b/language/api/README.rst.in @@ -18,3 +18,5 @@ samples: - name: Analyze syntax file: analyze.py show_help: true + +folder: language/api \ No newline at end of file diff --git a/language/classify_text/README.rst b/language/classify_text/README.rst index 0a61591bc22e..2857e0312309 100644 --- a/language/classify_text/README.rst +++ b/language/classify_text/README.rst @@ -3,6 +3,10 @@ Google Cloud Natural Language API Python Samples =============================================================================== +.. image:: https://gstatic.com/cloudssh/images/open-btn.png + :target: https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/GoogleCloudPlatform/python-docs-samples&page=editor&open_in_editor=language/classify_text/README.rst + + This directory contains samples for Google Cloud Natural Language API. The `Google Cloud Natural Language API`_ provides natural language understanding technologies to developers. This tutorial demostrates how to use the `classify_text` method to classify content category of text files, and use the result to compare texts by their similarity to each other. See the `tutorial page`_ for details about this sample. @@ -21,39 +25,20 @@ Setup Authentication ++++++++++++++ -Authentication is typically done through `Application Default Credentials`_, -which means you do not have to change the code to authenticate as long as -your environment has credentials. You have a few options for setting up -authentication: - -#. When running locally, use the `Google Cloud SDK`_ - - .. code-block:: bash - - gcloud auth application-default login - - -#. When running on App Engine or Compute Engine, credentials are already - set-up. However, you may need to configure your Compute Engine instance - with `additional scopes`_. - -#. You can create a `Service Account key file`_. This file can be used to - authenticate to Google Cloud Platform services from any environment. To use - the file, set the ``GOOGLE_APPLICATION_CREDENTIALS`` environment variable to - the path to the key file, for example: - - .. code-block:: bash - - export GOOGLE_APPLICATION_CREDENTIALS=/path/to/service_account.json +This sample requires you to have authentication setup. Refer to the +`Authentication Getting Started Guide`_ for instructions on setting up +credentials for applications. -.. _Application Default Credentials: https://cloud.google.com/docs/authentication#getting_credentials_for_server-centric_flow -.. _additional scopes: https://cloud.google.com/compute/docs/authentication#using -.. _Service Account key file: https://developers.google.com/identity/protocols/OAuth2ServiceAccount#creatinganaccount +.. _Authentication Getting Started Guide: + https://cloud.google.com/docs/authentication/getting-started Install Dependencies ++++++++++++++++++++ -#. Install `pip`_ and `virtualenv`_ if you do not already have them. +#. Install `pip`_ and `virtualenv`_ if you do not already have them. You may want to refer to the `Python Development Environment Setup Guide`_ for Google Cloud Platform for instructions. + + .. _Python Development Environment Setup Guide: + https://cloud.google.com/python/setup #. Create a virtualenv. Samples are compatible with Python 2.7 and 3.4+. @@ -77,6 +62,10 @@ Samples Classify Text Tutorial +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +.. image:: https://gstatic.com/cloudssh/images/open-btn.png + :target: https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/GoogleCloudPlatform/python-docs-samples&page=editor&open_in_editor=language/classify_text/classify_text_tutorial.py;language/classify_text/README.rst + + To run this sample: @@ -87,9 +76,13 @@ To run this sample: usage: classify_text_tutorial.py [-h] {classify,index,query,query-category} ... - - Using the classify_text method to cluster texts. - + + Using the classify_text method to find content categories of text files, + Then use the content category labels to compare text similarity. + + For more information, see the tutorial page at + https://cloud.google.com/natural-language/docs/classify-text-tutorial. + positional arguments: {classify,index,query,query-category} classify Classify the input text into categories. @@ -101,13 +94,14 @@ To run this sample: the query label. The list of all available labels: https://cloud.google.com/natural- language/docs/categories - + optional arguments: -h, --help show this help message and exit + The client library ------------------------------------------------------------------------------- diff --git a/language/classify_text/README.rst.in b/language/classify_text/README.rst.in index 42e8f061a5d7..14ee6dc9aa45 100644 --- a/language/classify_text/README.rst.in +++ b/language/classify_text/README.rst.in @@ -24,3 +24,5 @@ samples: show_help: true cloud_client_library: true + +folder: language/classify_text \ No newline at end of file diff --git a/language/cloud-client/v1/README.rst b/language/cloud-client/v1/README.rst index cf4c07d20b99..2e93e9af13fd 100644 --- a/language/cloud-client/v1/README.rst +++ b/language/cloud-client/v1/README.rst @@ -3,6 +3,10 @@ Google Cloud Natural Language API Python Samples =============================================================================== +.. image:: https://gstatic.com/cloudssh/images/open-btn.png + :target: https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/GoogleCloudPlatform/python-docs-samples&page=editor&open_in_editor=language/cloud-client/v1/README.rst + + This directory contains samples for Google Cloud Natural Language API. The `Google Cloud Natural Language API`_ provides natural language understanding technologies to developers, including sentiment analysis, entity recognition, and syntax analysis. This API is part of the larger Cloud Machine Learning API. - See the `migration guide`_ for information about migrating to Python client library v0.26.1. @@ -58,6 +62,10 @@ Samples Quickstart +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +.. image:: https://gstatic.com/cloudssh/images/open-btn.png + :target: https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/GoogleCloudPlatform/python-docs-samples&page=editor&open_in_editor=language/cloud-client/v1/quickstart.py;language/cloud-client/v1/README.rst + + To run this sample: @@ -70,6 +78,10 @@ To run this sample: Snippets +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +.. image:: https://gstatic.com/cloudssh/images/open-btn.png + :target: https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/GoogleCloudPlatform/python-docs-samples&page=editor&open_in_editor=language/cloud-client/v1/snippets.py;language/cloud-client/v1/README.rst + + To run this sample: @@ -79,17 +91,20 @@ To run this sample: $ python snippets.py usage: snippets.py [-h] - {sentiment-entities-text,sentiment-entities-file,sentiment-text,sentiment-file,entities-text,entities-file,syntax-text,syntax-file} + {classify-text,classify-file,sentiment-entities-text,sentiment-entities-file,sentiment-text,sentiment-file,entities-text,entities-file,syntax-text,syntax-file} ... - + This application demonstrates how to perform basic operations with the Google Cloud Natural Language API - + For more information, the documentation at https://cloud.google.com/natural-language/docs. - + positional arguments: - {sentiment-entities-text,sentiment-entities-file,sentiment-text,sentiment-file,entities-text,entities-file,syntax-text,syntax-file} + {classify-text,classify-file,sentiment-entities-text,sentiment-entities-file,sentiment-text,sentiment-file,entities-text,entities-file,syntax-text,syntax-file} + classify-text Classifies content categories of the provided text. + classify-file Classifies content categories of the text in a Google + Cloud Storage file. sentiment-entities-text Detects entity sentiment in the provided text. sentiment-entities-file @@ -104,13 +119,14 @@ To run this sample: syntax-text Detects syntax in the text. syntax-file Detects syntax in the file located in Google Cloud Storage. - + optional arguments: -h, --help show this help message and exit + The client library ------------------------------------------------------------------------------- diff --git a/language/cloud-client/v1/README.rst.in b/language/cloud-client/v1/README.rst.in index 1b4855fb4f38..06b7ff3e1953 100644 --- a/language/cloud-client/v1/README.rst.in +++ b/language/cloud-client/v1/README.rst.in @@ -28,3 +28,5 @@ samples: show_help: true cloud_client_library: true + +folder: language/cloud-client/v1 \ No newline at end of file diff --git a/language/cloud-client/v1beta2/README.rst b/language/cloud-client/v1beta2/README.rst index f2ec309a64e0..aa4ce4524827 100644 --- a/language/cloud-client/v1beta2/README.rst +++ b/language/cloud-client/v1beta2/README.rst @@ -3,6 +3,10 @@ Google Cloud Natural Language API Python Samples =============================================================================== +.. image:: https://gstatic.com/cloudssh/images/open-btn.png + :target: https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/GoogleCloudPlatform/python-docs-samples&page=editor&open_in_editor=language/cloud-client/v1beta2/README.rst + + This directory contains samples for Google Cloud Natural Language API. The `Google Cloud Natural Language API`_ provides natural language understanding technologies to developers, including sentiment analysis, entity recognition, and syntax analysis. This API is part of the larger Cloud Machine Learning API. - See the `migration guide`_ for information about migrating to Python client library v0.26.1. @@ -58,6 +62,10 @@ Samples Quickstart +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +.. image:: https://gstatic.com/cloudssh/images/open-btn.png + :target: https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/GoogleCloudPlatform/python-docs-samples&page=editor&open_in_editor=language/cloud-client/v1beta2/quickstart.py;language/cloud-client/v1beta2/README.rst + + To run this sample: @@ -70,6 +78,10 @@ To run this sample: Snippets +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +.. image:: https://gstatic.com/cloudssh/images/open-btn.png + :target: https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/GoogleCloudPlatform/python-docs-samples&page=editor&open_in_editor=language/cloud-client/v1beta2/snippets.py;language/cloud-client/v1beta2/README.rst + + To run this sample: @@ -81,13 +93,13 @@ To run this sample: usage: snippets.py [-h] {classify-text,classify-file,sentiment-entities-text,sentiment-entities-file,sentiment-text,sentiment-file,entities-text,entities-file,syntax-text,syntax-file} ... - + This application demonstrates how to perform basic operations with the Google Cloud Natural Language API - + For more information, the documentation at https://cloud.google.com/natural-language/docs. - + positional arguments: {classify-text,classify-file,sentiment-entities-text,sentiment-entities-file,sentiment-text,sentiment-file,entities-text,entities-file,syntax-text,syntax-file} classify-text Classifies content categories of the provided text. @@ -107,13 +119,14 @@ To run this sample: syntax-text Detects syntax in the text. syntax-file Detects syntax in the file located in Google Cloud Storage. - + optional arguments: -h, --help show this help message and exit + The client library ------------------------------------------------------------------------------- diff --git a/language/cloud-client/v1beta2/README.rst.in b/language/cloud-client/v1beta2/README.rst.in index 1b4855fb4f38..d11667458a5a 100644 --- a/language/cloud-client/v1beta2/README.rst.in +++ b/language/cloud-client/v1beta2/README.rst.in @@ -28,3 +28,5 @@ samples: show_help: true cloud_client_library: true + +folder: language/cloud-client/v1beta2 \ No newline at end of file diff --git a/language/movie_nl/README.md b/language/movie_nl/README.md index 687a6c4058ab..95c05dbbce12 100644 --- a/language/movie_nl/README.md +++ b/language/movie_nl/README.md @@ -1,4 +1,9 @@ # Introduction + +[![Open in Cloud Shell][shell_img]][shell_link] + +[shell_img]: http://gstatic.com/cloudssh/images/open-btn.png +[shell_link]: https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/GoogleCloudPlatform/python-docs-samples&page=editor&open_in_editor=language/movie_nl/README.md This sample is an application of the Google Cloud Platform Natural Language API. It uses the [imdb movie reviews data set](https://www.cs.cornell.edu/people/pabo/movie-review-data/) from [Cornell University](http://www.cs.cornell.edu/) and performs sentiment & entity diff --git a/language/ocr_nl/README.md b/language/ocr_nl/README.md index 189e93979010..a34ff3179c4c 100644 --- a/language/ocr_nl/README.md +++ b/language/ocr_nl/README.md @@ -1,4 +1,9 @@ + +[![Open in Cloud Shell][shell_img]][shell_link] + +[shell_img]: http://gstatic.com/cloudssh/images/open-btn.png +[shell_link]: https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/GoogleCloudPlatform/python-docs-samples&page=editor&open_in_editor=language/ocr_nl/README.md # Using the Cloud Natural Language API to analyze image text found with Cloud Vision This example uses the [Cloud Vision API](https://cloud.google.com/vision/) to diff --git a/language/sentiment/README.md b/language/sentiment/README.md index 955629931ee0..313817ef2fe1 100644 --- a/language/sentiment/README.md +++ b/language/sentiment/README.md @@ -1,5 +1,10 @@ # Introduction +[![Open in Cloud Shell][shell_img]][shell_link] + +[shell_img]: http://gstatic.com/cloudssh/images/open-btn.png +[shell_link]: https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/GoogleCloudPlatform/python-docs-samples&page=editor&open_in_editor=language/sentiment/README.md + This sample contains the code referenced in the [Sentiment Analysis Tutorial](http://cloud.google.com/natural-language/docs/sentiment-tutorial) within the Google Cloud Natural Language API Documentation. A full walkthrough of this sample diff --git a/language/syntax_triples/README.md b/language/syntax_triples/README.md index 1342ee65289d..551057e7217d 100644 --- a/language/syntax_triples/README.md +++ b/language/syntax_triples/README.md @@ -1,5 +1,10 @@ # Using the Cloud Natural Language API to find subject-verb-object triples in text +[![Open in Cloud Shell][shell_img]][shell_link] + +[shell_img]: http://gstatic.com/cloudssh/images/open-btn.png +[shell_link]: https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/GoogleCloudPlatform/python-docs-samples&page=editor&open_in_editor=language/syntax_triples/README.md + This example finds subject-verb-object triples in a given piece of text using syntax analysis capabilities of [Cloud Natural Language API](https://cloud.google.com/natural-language/). diff --git a/language/tutorial/README.rst b/language/tutorial/README.rst index 651b219cad1d..202381a6f350 100644 --- a/language/tutorial/README.rst +++ b/language/tutorial/README.rst @@ -3,6 +3,10 @@ Google Cloud Natural Language Tutorial Python Samples =============================================================================== +.. image:: https://gstatic.com/cloudssh/images/open-btn.png + :target: https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/GoogleCloudPlatform/python-docs-samples&page=editor&open_in_editor=language/tutorial/README.rst + + This directory contains samples for Google Cloud Natural Language Tutorial. The `Google Cloud Natural Language API`_ provides natural language understanding technologies to developers, including sentiment analysis, entity recognition, and syntax analysis. This API is part of the larger Cloud Machine Learning API. @@ -54,6 +58,10 @@ Samples Language tutorial +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +.. image:: https://gstatic.com/cloudssh/images/open-btn.png + :target: https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/GoogleCloudPlatform/python-docs-samples&page=editor&open_in_editor=language/tutorial/tutorial.py;language/tutorial/README.rst + + To run this sample: @@ -63,16 +71,17 @@ To run this sample: $ python tutorial.py usage: tutorial.py [-h] movie_review_filename - + positional arguments: movie_review_filename The filename of the movie review you'd like to analyze. - + optional arguments: -h, --help show this help message and exit + .. _Google Cloud SDK: https://cloud.google.com/sdk/ \ No newline at end of file diff --git a/language/tutorial/README.rst.in b/language/tutorial/README.rst.in index aea593b277f4..945c701e510e 100644 --- a/language/tutorial/README.rst.in +++ b/language/tutorial/README.rst.in @@ -18,3 +18,5 @@ samples: - name: Language tutorial file: tutorial.py show_help: true + +folder: language/tutorial \ No newline at end of file diff --git a/logging/cloud-client/README.rst b/logging/cloud-client/README.rst index 4612fdd05cf9..00b7fa91a84d 100644 --- a/logging/cloud-client/README.rst +++ b/logging/cloud-client/README.rst @@ -3,6 +3,10 @@ Stackdriver Logging Python Samples =============================================================================== +.. image:: https://gstatic.com/cloudssh/images/open-btn.png + :target: https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/GoogleCloudPlatform/python-docs-samples&page=editor&open_in_editor=logging/cloud-client/README.rst + + This directory contains samples for Stackdriver Logging. `Stackdriver Logging`_ allows you to store, search, analyze, monitor, and alert on log data and events from Google Cloud Platform and Amazon Web Services. @@ -54,30 +58,26 @@ Samples Quickstart +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +.. image:: https://gstatic.com/cloudssh/images/open-btn.png + :target: https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/GoogleCloudPlatform/python-docs-samples&page=editor&open_in_editor=logging/cloud-client/quickstart.py;logging/cloud-client/README.rst -To run this sample: - -.. code-block:: bash - - $ python quickstart.py - - -Handler -+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ - To run this sample: .. code-block:: bash - $ python handler.py + $ python quickstart.py Snippets +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +.. image:: https://gstatic.com/cloudssh/images/open-btn.png + :target: https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/GoogleCloudPlatform/python-docs-samples&page=editor&open_in_editor=logging/cloud-client/snippets.py;logging/cloud-client/README.rst + + To run this sample: @@ -87,13 +87,13 @@ To run this sample: $ python snippets.py usage: snippets.py [-h] logger_name {list,write,delete} ... - + This application demonstrates how to perform basic operations on logs and log entries with Stackdriver Logging. - + For more information, see the README.md under /logging and the documentation at https://cloud.google.com/logging/docs. - + positional arguments: logger_name Logger name {list,write,delete} @@ -101,14 +101,19 @@ To run this sample: write Writes log entries to the given logger. delete Deletes a logger and all its entries. Note that a deletion can take several minutes to take effect. - + optional arguments: -h, --help show this help message and exit + Export +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +.. image:: https://gstatic.com/cloudssh/images/open-btn.png + :target: https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/GoogleCloudPlatform/python-docs-samples&page=editor&open_in_editor=logging/cloud-client/export.py;logging/cloud-client/README.rst + + To run this sample: @@ -118,7 +123,7 @@ To run this sample: $ python export.py usage: export.py [-h] {list,create,update,delete} ... - + positional arguments: {list,create,update,delete} list Lists all sinks. @@ -131,13 +136,14 @@ To run this sample: om/logging/docs/view/advanced_filters for more filter information. delete Deletes a sink. - + optional arguments: -h, --help show this help message and exit + The client library ------------------------------------------------------------------------------- diff --git a/logging/cloud-client/README.rst.in b/logging/cloud-client/README.rst.in index 50862fa1da9b..00fa4b6b83c1 100644 --- a/logging/cloud-client/README.rst.in +++ b/logging/cloud-client/README.rst.in @@ -24,3 +24,5 @@ samples: show_help: true cloud_client_library: true + +folder: logging/cloud-client \ No newline at end of file diff --git a/ml_engine/online_prediction/README.md b/ml_engine/online_prediction/README.md index 07c160f2311e..c0a3909a3aa5 100644 --- a/ml_engine/online_prediction/README.md +++ b/ml_engine/online_prediction/README.md @@ -1 +1,6 @@ https://cloud.google.com/ml-engine/docs/concepts/prediction-overview + +[![Open in Cloud Shell][shell_img]][shell_link] + +[shell_img]: http://gstatic.com/cloudssh/images/open-btn.png +[shell_link]: https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/GoogleCloudPlatform/python-docs-samples&page=editor&open_in_editor=ml_engine/online_prediction/README.md diff --git a/monitoring/api/v3/api-client/README.rst b/monitoring/api/v3/api-client/README.rst index 2765e84b10a1..cf5057447453 100644 --- a/monitoring/api/v3/api-client/README.rst +++ b/monitoring/api/v3/api-client/README.rst @@ -3,6 +3,10 @@ Stackdriver Monitoring Python Samples =============================================================================== +.. image:: https://gstatic.com/cloudssh/images/open-btn.png + :target: https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/GoogleCloudPlatform/python-docs-samples&page=editor&open_in_editor=monitoring/api/v3/api-client/README.rst + + This directory contains samples for Stackdriver Monitoring. `Stackdriver Monitoring `_ collects metrics, events, and metadata from Google Cloud Platform, Amazon Web Services (AWS), hosted uptime probes, application instrumentation, and a variety of common application components including Cassandra, Nginx, Apache Web Server, Elasticsearch and many others. Stackdriver ingests that data and generates insights via dashboards, charts, and alerts. @@ -54,6 +58,10 @@ Samples List resources +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +.. image:: https://gstatic.com/cloudssh/images/open-btn.png + :target: https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/GoogleCloudPlatform/python-docs-samples&page=editor&open_in_editor=monitoring/api/v3/api-client/list_resources.py;monitoring/api/v3/api-client/README.rst + + To run this sample: @@ -63,25 +71,30 @@ To run this sample: $ python list_resources.py usage: list_resources.py [-h] --project_id PROJECT_ID - + Sample command-line program for retrieving Stackdriver Monitoring API V3 data. - + See README.md for instructions on setting up your development environment. - + To run locally: - + python list_resources.py --project_id= - + optional arguments: -h, --help show this help message and exit --project_id PROJECT_ID Project ID you want to access. + Custom metrics +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +.. image:: https://gstatic.com/cloudssh/images/open-btn.png + :target: https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/GoogleCloudPlatform/python-docs-samples&page=editor&open_in_editor=monitoring/api/v3/api-client/custom_metric.py;monitoring/api/v3/api-client/README.rst + + To run this sample: @@ -91,21 +104,21 @@ To run this sample: $ python custom_metric.py usage: custom_metric.py [-h] --project_id PROJECT_ID - + Sample command-line program for writing and reading Stackdriver Monitoring API V3 custom metrics. - + Simple command-line program to demonstrate connecting to the Google Monitoring API to write custom metrics and read them back. - + See README.md for instructions on setting up your development environment. - + This example creates a custom metric based on a hypothetical GAUGE measurement. - + To run locally: - + python custom_metric.py --project_id= - + optional arguments: -h, --help show this help message and exit --project_id PROJECT_ID @@ -114,4 +127,5 @@ To run this sample: + .. _Google Cloud SDK: https://cloud.google.com/sdk/ \ No newline at end of file diff --git a/monitoring/api/v3/api-client/README.rst.in b/monitoring/api/v3/api-client/README.rst.in index 1b5d94ddf284..e71bd6de87c5 100644 --- a/monitoring/api/v3/api-client/README.rst.in +++ b/monitoring/api/v3/api-client/README.rst.in @@ -23,3 +23,5 @@ samples: - name: Custom metrics file: custom_metric.py show_help: true + +folder: monitoring/api/v3/api-client \ No newline at end of file diff --git a/monitoring/api/v3/cloud-client/README.rst b/monitoring/api/v3/cloud-client/README.rst index 96b55bacbb44..fe82879f0255 100644 --- a/monitoring/api/v3/cloud-client/README.rst +++ b/monitoring/api/v3/cloud-client/README.rst @@ -3,6 +3,10 @@ Google Stackdriver Monitoring API Python Samples =============================================================================== +.. image:: https://gstatic.com/cloudssh/images/open-btn.png + :target: https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/GoogleCloudPlatform/python-docs-samples&page=editor&open_in_editor=monitoring/api/v3/cloud-client/README.rst + + This directory contains samples for Google Stackdriver Monitoring API. Stackdriver Monitoring collects metrics, events, and metadata from Google Cloud Platform, Amazon Web Services (AWS), hosted uptime probes, application instrumentation, and a variety of common application components including Cassandra, Nginx, Apache Web Server, Elasticsearch and many others. Stackdriver ingests that data and generates insights via dashboards, charts, and alerts. @@ -56,6 +60,10 @@ Samples Quickstart +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +.. image:: https://gstatic.com/cloudssh/images/open-btn.png + :target: https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/GoogleCloudPlatform/python-docs-samples&page=editor&open_in_editor=monitoring/api/v3/cloud-client/quickstart.py;monitoring/api/v3/cloud-client/README.rst + + To run this sample: @@ -68,6 +76,10 @@ To run this sample: Snippets +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +.. image:: https://gstatic.com/cloudssh/images/open-btn.png + :target: https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/GoogleCloudPlatform/python-docs-samples&page=editor&open_in_editor=monitoring/api/v3/cloud-client/snippets.py;monitoring/api/v3/cloud-client/README.rst + + To run this sample: @@ -79,9 +91,9 @@ To run this sample: usage: snippets.py [-h] {create-metric-descriptor,list-metric-descriptors,get-metric-descriptor,delete-metric-descriptor,list-resources,get-resource,write-time-series,list-time-series,list-time-series-header,list-time-series-reduce,list-time-series-aggregate} ... - + Demonstrates Monitoring API operations. - + positional arguments: {create-metric-descriptor,list-metric-descriptors,get-metric-descriptor,delete-metric-descriptor,list-resources,get-resource,write-time-series,list-time-series,list-time-series-header,list-time-series-reduce,list-time-series-aggregate} create-metric-descriptor @@ -95,13 +107,14 @@ To run this sample: list-time-series-header list-time-series-reduce list-time-series-aggregate - + optional arguments: -h, --help show this help message and exit + The client library ------------------------------------------------------------------------------- diff --git a/monitoring/api/v3/cloud-client/README.rst.in b/monitoring/api/v3/cloud-client/README.rst.in index c69b5e6fb246..d6a0dd460997 100644 --- a/monitoring/api/v3/cloud-client/README.rst.in +++ b/monitoring/api/v3/cloud-client/README.rst.in @@ -24,3 +24,5 @@ samples: show_help: true cloud_client_library: true + +folder: monitoring/api/v3/cloud-client \ No newline at end of file diff --git a/pubsub/cloud-client/README.rst b/pubsub/cloud-client/README.rst index df1dbf7c626f..0ecf4b1930dd 100644 --- a/pubsub/cloud-client/README.rst +++ b/pubsub/cloud-client/README.rst @@ -3,6 +3,10 @@ Google Cloud Pub/Sub Python Samples =============================================================================== +.. image:: https://gstatic.com/cloudssh/images/open-btn.png + :target: https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/GoogleCloudPlatform/python-docs-samples&page=editor&open_in_editor=pubsub/cloud-client/README.rst + + This directory contains samples for Google Cloud Pub/Sub. `Google Cloud Pub/Sub`_ is a fully-managed real-time messaging service that allows you to send and receive messages between independent applications. @@ -54,6 +58,10 @@ Samples Quickstart +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +.. image:: https://gstatic.com/cloudssh/images/open-btn.png + :target: https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/GoogleCloudPlatform/python-docs-samples&page=editor&open_in_editor=pubsub/cloud-client/quickstart.py;pubsub/cloud-client/README.rst + + To run this sample: @@ -66,6 +74,10 @@ To run this sample: Publisher +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +.. image:: https://gstatic.com/cloudssh/images/open-btn.png + :target: https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/GoogleCloudPlatform/python-docs-samples&page=editor&open_in_editor=pubsub/cloud-client/publisher.py;pubsub/cloud-client/README.rst + + To run this sample: @@ -78,13 +90,13 @@ To run this sample: project {list,create,delete,publish,publish-with-futures,publish-with-batch-settings} ... - + This application demonstrates how to perform basic operations on topics with the Cloud Pub/Sub API. - + For more information, see the README.md under /pubsub and the documentation at https://cloud.google.com/pubsub/docs. - + positional arguments: project Your Google Cloud project ID {list,create,delete,publish,publish-with-futures,publish-with-batch-settings} @@ -98,14 +110,19 @@ To run this sample: publish-with-batch-settings Publishes multiple messages to a Pub/Sub topic with batch settings. - + optional arguments: -h, --help show this help message and exit + Subscribers +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +.. image:: https://gstatic.com/cloudssh/images/open-btn.png + :target: https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/GoogleCloudPlatform/python-docs-samples&page=editor&open_in_editor=pubsub/cloud-client/subscriber.py;pubsub/cloud-client/README.rst + + To run this sample: @@ -115,33 +132,40 @@ To run this sample: $ python subscriber.py usage: subscriber.py [-h] - project {list,create,delete,receive,receive-flow-control} + project + {list_in_topic,list_in_project,create,delete,receive,receive-flow-control} ... - + This application demonstrates how to perform basic operations on subscriptions with the Cloud Pub/Sub API. - + For more information, see the README.md under /pubsub and the documentation at https://cloud.google.com/pubsub/docs. - + positional arguments: project Your Google Cloud project ID - {list,create,delete,receive,receive-flow-control} - list Lists all subscriptions for a given topic. + {list_in_topic,list_in_project,create,delete,receive,receive-flow-control} + list_in_topic Lists all subscriptions for a given topic. + list_in_project Lists all subscriptions in the current project. create Create a new pull subscription on the given topic. delete Deletes an existing Pub/Sub topic. receive Receives messages from a pull subscription. receive-flow-control Receives messages from a pull subscription with flow control. - + optional arguments: -h, --help show this help message and exit + Identity and Access Management +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +.. image:: https://gstatic.com/cloudssh/images/open-btn.png + :target: https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/GoogleCloudPlatform/python-docs-samples&page=editor&open_in_editor=pubsub/cloud-client/iam.py;pubsub/cloud-client/README.rst + + To run this sample: @@ -154,13 +178,13 @@ To run this sample: project {get-topic-policy,get-subscription-policy,set-topic-policy,set-subscription-policy,check-topic-permissions,check-subscription-permissions} ... - + This application demonstrates how to perform basic operations on IAM policies with the Cloud Pub/Sub API. - + For more information, see the README.md under /pubsub and the documentation at https://cloud.google.com/pubsub/docs. - + positional arguments: project Your Google Cloud project ID {get-topic-policy,get-subscription-policy,set-topic-policy,set-subscription-policy,check-topic-permissions,check-subscription-permissions} @@ -176,13 +200,14 @@ To run this sample: check-subscription-permissions Checks to which permissions are available on the given subscription. - + optional arguments: -h, --help show this help message and exit + The client library ------------------------------------------------------------------------------- diff --git a/pubsub/cloud-client/README.rst.in b/pubsub/cloud-client/README.rst.in index 6a9fd00c722b..ddbc647121b2 100644 --- a/pubsub/cloud-client/README.rst.in +++ b/pubsub/cloud-client/README.rst.in @@ -26,3 +26,5 @@ samples: show_help: true cloud_client_library: true + +folder: pubsub/cloud-client \ No newline at end of file diff --git a/scripts/README.md b/scripts/README.md index 5b071c5ebdd3..21c84b3ab3bf 100755 --- a/scripts/README.md +++ b/scripts/README.md @@ -1 +1,6 @@ These scripts are used for the maintenance of this repository and are not necessarily meant as samples. + +[![Open in Cloud Shell][shell_img]][shell_link] + +[shell_img]: http://gstatic.com/cloudssh/images/open-btn.png +[shell_link]: https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/GoogleCloudPlatform/python-docs-samples&page=editor&open_in_editor=scripts/README.md diff --git a/scripts/readme-gen/templates/README.tmpl.rst b/scripts/readme-gen/templates/README.tmpl.rst index 79ab5688aaf7..6bcf46ab4aea 100644 --- a/scripts/readme-gen/templates/README.tmpl.rst +++ b/scripts/readme-gen/templates/README.tmpl.rst @@ -5,6 +5,10 @@ {{product.name}} Python Samples =============================================================================== +.. image:: https://gstatic.com/cloudssh/images/open-btn.png + :target: https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/GoogleCloudPlatform/python-docs-samples&page=editor&open_in_editor={{folder}}/README.rst + + This directory contains samples for {{product.name}}. {{product.description}} {{description}} @@ -30,6 +34,10 @@ Samples {{sample.name}} +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +.. image:: https://gstatic.com/cloudssh/images/open-btn.png + :target: https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/GoogleCloudPlatform/python-docs-samples&page=editor&open_in_editor={{folder}}/{{sample.file}};{{folder}}/README.rst + + {{sample.description}} To run this sample: diff --git a/spanner/cloud-client/README.rst b/spanner/cloud-client/README.rst index 5ebf344a090f..a68f8016e15c 100644 --- a/spanner/cloud-client/README.rst +++ b/spanner/cloud-client/README.rst @@ -3,6 +3,10 @@ Google Cloud Spanner Python Samples =============================================================================== +.. image:: https://gstatic.com/cloudssh/images/open-btn.png + :target: https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/GoogleCloudPlatform/python-docs-samples&page=editor&open_in_editor=spanner/cloud-client/README.rst + + This directory contains samples for Google Cloud Spanner. `Google Cloud Spanner`_ is a highly scalable, transactional, managed, NewSQL database service. Cloud Spanner solves the need for a horizontally-scaling database with consistent global transactions and SQL semantics. @@ -54,6 +58,10 @@ Samples Snippets +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +.. image:: https://gstatic.com/cloudssh/images/open-btn.png + :target: https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/GoogleCloudPlatform/python-docs-samples&page=editor&open_in_editor=spanner/cloud-client/snippets.py;spanner/cloud-client/README.rst + + To run this sample: @@ -66,12 +74,12 @@ To run this sample: instance_id {create_database,insert_data,query_data,read_data,read_stale_data,add_column,update_data,query_data_with_new_column,read_write_transaction,read_only_transaction,add_index,query_data_with_index,read_data_with_index,add_storing_index,read_data_with_storing_index} ... - + This application demonstrates how to do basic operations using Cloud Spanner. - + For more information, see the README.rst under /spanner. - + positional arguments: instance_id Your Cloud Spanner instance ID. {create_database,insert_data,query_data,read_data,read_stale_data,add_column,update_data,query_data_with_new_column,read_write_transaction,read_only_transaction,add_index,query_data_with_index,read_data_with_index,add_storing_index,read_data_with_storing_index} @@ -82,7 +90,7 @@ To run this sample: query_data Queries sample data from the database using SQL. read_data Reads sample data from the database. read_stale_data Reads sample data from the database. The data is - exactly 10 seconds stale. + exactly 15 seconds stale. add_column Adds a new column to the Albums table in the example database. update_data Updates sample data in the database. This updates the @@ -131,7 +139,7 @@ To run this sample: Inserts sample data into the given database. The database and table must already exist and can be created using `create_database`. - + optional arguments: -h, --help show this help message and exit --database-id DATABASE_ID @@ -140,6 +148,7 @@ To run this sample: + The client library ------------------------------------------------------------------------------- diff --git a/spanner/cloud-client/README.rst.in b/spanner/cloud-client/README.rst.in index 40ff29695be8..542becb9a7ff 100644 --- a/spanner/cloud-client/README.rst.in +++ b/spanner/cloud-client/README.rst.in @@ -20,3 +20,5 @@ samples: show_help: true cloud_client_library: true + +folder: spanner/cloud-client \ No newline at end of file diff --git a/speech/cloud-client/README.rst b/speech/cloud-client/README.rst index edd05f661a0d..ae1fe3c58a6f 100644 --- a/speech/cloud-client/README.rst +++ b/speech/cloud-client/README.rst @@ -3,6 +3,10 @@ Google Cloud Speech API Python Samples =============================================================================== +.. image:: https://gstatic.com/cloudssh/images/open-btn.png + :target: https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/GoogleCloudPlatform/python-docs-samples&page=editor&open_in_editor=speech/cloud-client/README.rst + + This directory contains samples for Google Cloud Speech API. The `Google Cloud Speech API`_ enables easy integration of Google speech recognition technologies into developer applications. Send audio and receive a text transcription from the Cloud Speech API service. - See the `migration guide`_ for information about migrating to Python client library v0.27. @@ -58,6 +62,10 @@ Samples Quickstart +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +.. image:: https://gstatic.com/cloudssh/images/open-btn.png + :target: https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/GoogleCloudPlatform/python-docs-samples&page=editor&open_in_editor=speech/cloud-client/quickstart.py;speech/cloud-client/README.rst + + To run this sample: @@ -70,6 +78,10 @@ To run this sample: Transcribe +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +.. image:: https://gstatic.com/cloudssh/images/open-btn.png + :target: https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/GoogleCloudPlatform/python-docs-samples&page=editor&open_in_editor=speech/cloud-client/transcribe.py;speech/cloud-client/README.rst + + To run this sample: @@ -79,24 +91,29 @@ To run this sample: $ python transcribe.py usage: transcribe.py [-h] path - + Google Cloud Speech API sample application using the REST API for batch processing. - + Example usage: python transcribe.py resources/audio.raw python transcribe.py gs://cloud-samples-tests/speech/brooklyn.flac - + positional arguments: path File or GCS path for audio file to be recognized - + optional arguments: -h, --help show this help message and exit + Transcribe async +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +.. image:: https://gstatic.com/cloudssh/images/open-btn.png + :target: https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/GoogleCloudPlatform/python-docs-samples&page=editor&open_in_editor=speech/cloud-client/transcribe_async.py;speech/cloud-client/README.rst + + To run this sample: @@ -106,24 +123,29 @@ To run this sample: $ python transcribe_async.py usage: transcribe_async.py [-h] path - + Google Cloud Speech API sample application using the REST API for async batch processing. - + Example usage: python transcribe_async.py resources/audio.raw python transcribe_async.py gs://cloud-samples-tests/speech/vr.flac - + positional arguments: path File or GCS path for audio file to be recognized - + optional arguments: -h, --help show this help message and exit + Transcribe with word time offsets +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +.. image:: https://gstatic.com/cloudssh/images/open-btn.png + :target: https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/GoogleCloudPlatform/python-docs-samples&page=editor&open_in_editor=speech/cloud-client/transcribe_word_time_offsets.py;speech/cloud-client/README.rst + + To run this sample: @@ -133,23 +155,28 @@ To run this sample: $ python transcribe_word_time_offsets.py usage: transcribe_word_time_offsets.py [-h] path - + Google Cloud Speech API sample that demonstrates word time offsets. - + Example usage: python transcribe_word_time_offsets.py resources/audio.raw python transcribe_word_time_offsets.py gs://cloud-samples-tests/speech/vr.flac - + positional arguments: path File or GCS path for audio file to be recognized - + optional arguments: -h, --help show this help message and exit + Transcribe Streaming +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +.. image:: https://gstatic.com/cloudssh/images/open-btn.png + :target: https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/GoogleCloudPlatform/python-docs-samples&page=editor&open_in_editor=speech/cloud-client/transcribe_streaming.py;speech/cloud-client/README.rst + + To run this sample: @@ -159,21 +186,22 @@ To run this sample: $ python transcribe_streaming.py usage: transcribe_streaming.py [-h] stream - + Google Cloud Speech API sample application using the streaming API. - + Example usage: python transcribe_streaming.py resources/audio.raw - + positional arguments: stream File to stream to the API - + optional arguments: -h, --help show this help message and exit + The client library ------------------------------------------------------------------------------- diff --git a/speech/cloud-client/README.rst.in b/speech/cloud-client/README.rst.in index c2589cd88282..ae84c9e824ad 100644 --- a/speech/cloud-client/README.rst.in +++ b/speech/cloud-client/README.rst.in @@ -36,3 +36,5 @@ samples: show_help: true cloud_client_library: true + +folder: speech/cloud-client \ No newline at end of file diff --git a/storage/api/README.rst b/storage/api/README.rst index 63337e40ccb1..5ec20160cedd 100644 --- a/storage/api/README.rst +++ b/storage/api/README.rst @@ -3,6 +3,10 @@ Google Cloud Storage Python Samples =============================================================================== +.. image:: https://gstatic.com/cloudssh/images/open-btn.png + :target: https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/GoogleCloudPlatform/python-docs-samples&page=editor&open_in_editor=storage/api/README.rst + + This directory contains samples for Google Cloud Storage. `Google Cloud Storage`_ allows world-wide storage and retrieval of any amount of data at any time. @@ -54,6 +58,10 @@ Samples List Objects +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +.. image:: https://gstatic.com/cloudssh/images/open-btn.png + :target: https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/GoogleCloudPlatform/python-docs-samples&page=editor&open_in_editor=storage/api/list_objects.py;storage/api/README.rst + + To run this sample: @@ -63,26 +71,31 @@ To run this sample: $ python list_objects.py usage: list_objects.py [-h] bucket - + Command-line sample application for listing all objects in a bucket using the Cloud Storage API. - + This sample is used on this page: - + https://cloud.google.com/storage/docs/json_api/v1/json-api-python-samples - + For more information, see the README.md under /storage. - + positional arguments: bucket Your Cloud Storage bucket. - + optional arguments: -h, --help show this help message and exit + CRUD Objects +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +.. image:: https://gstatic.com/cloudssh/images/open-btn.png + :target: https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/GoogleCloudPlatform/python-docs-samples&page=editor&open_in_editor=storage/api/crud_object.py;storage/api/README.rst + + To run this sample: @@ -92,28 +105,33 @@ To run this sample: $ python crud_object.py usage: crud_object.py [-h] [--reader READER] [--owner OWNER] filename bucket - + Application for uploading an object using the Cloud Storage API. - + This sample is used on this page: - + https://cloud.google.com/storage/docs/json_api/v1/json-api-python-samples - + For more information, see the README.md under /storage. - + positional arguments: filename The name of the file to upload bucket Your Cloud Storage bucket. - + optional arguments: -h, --help show this help message and exit --reader READER Your Cloud Storage bucket. --owner OWNER Your Cloud Storage bucket. + Compose objects +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +.. image:: https://gstatic.com/cloudssh/images/open-btn.png + :target: https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/GoogleCloudPlatform/python-docs-samples&page=editor&open_in_editor=storage/api/compose_objects.py;storage/api/README.rst + + To run this sample: @@ -123,35 +141,40 @@ To run this sample: $ python compose_objects.py usage: compose_objects.py [-h] bucket destination sources [sources ...] - + Command-line sample application for composing objects using the Cloud Storage API. - + This sample is used on this page: - + https://cloud.google.com/storage/docs/json_api/v1/json-api-python-samples - + For more information, see the README.md under /storage. - + To run, create a least two sample files: $ echo "File 1" > file1.txt $ echo "File 2" > file2.txt - + Example invocation: $ python compose_objects.py my-bucket destination.txt file1.txt file2.txt - + positional arguments: bucket Your Cloud Storage bucket. destination Destination file name. sources Source files to compose. - + optional arguments: -h, --help show this help message and exit + Customer-Supplied Encryption +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +.. image:: https://gstatic.com/cloudssh/images/open-btn.png + :target: https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/GoogleCloudPlatform/python-docs-samples&page=editor&open_in_editor=storage/api/customer_supplied_keys.py;storage/api/README.rst + + To run this sample: @@ -161,27 +184,28 @@ To run this sample: $ python customer_supplied_keys.py usage: customer_supplied_keys.py [-h] bucket filename - + Command-line sample app demonstrating customer-supplied encryption keys. - + This sample demonstrates uploading an object while supplying an encryption key, retrieving that object's contents, and finally rotating that key to a new value. - + This sample is used on this page: - + https://cloud.google.com/storage/docs/json_api/v1/json-api-python-samples - + For more information, see the README.md under /storage. - + positional arguments: bucket Your Cloud Storage bucket. filename A file to upload and download. - + optional arguments: -h, --help show this help message and exit + .. _Google Cloud SDK: https://cloud.google.com/sdk/ \ No newline at end of file diff --git a/storage/api/README.rst.in b/storage/api/README.rst.in index fafd9f1d8e02..6bd64f097df0 100644 --- a/storage/api/README.rst.in +++ b/storage/api/README.rst.in @@ -25,3 +25,5 @@ samples: - name: Customer-Supplied Encryption file: customer_supplied_keys.py show_help: true + +folder: storage/api \ No newline at end of file diff --git a/storage/cloud-client/README.rst b/storage/cloud-client/README.rst index 471df76a7b58..fdfde20f8e43 100644 --- a/storage/cloud-client/README.rst +++ b/storage/cloud-client/README.rst @@ -3,6 +3,10 @@ Google Cloud Storage Python Samples =============================================================================== +.. image:: https://gstatic.com/cloudssh/images/open-btn.png + :target: https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/GoogleCloudPlatform/python-docs-samples&page=editor&open_in_editor=storage/cloud-client/README.rst + + This directory contains samples for Google Cloud Storage. `Google Cloud Storage`_ allows world-wide storage and retrieval of any amount of data at any time. @@ -54,6 +58,10 @@ Samples Quickstart +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +.. image:: https://gstatic.com/cloudssh/images/open-btn.png + :target: https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/GoogleCloudPlatform/python-docs-samples&page=editor&open_in_editor=storage/cloud-client/quickstart.py;storage/cloud-client/README.rst + + To run this sample: @@ -66,6 +74,10 @@ To run this sample: Snippets +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +.. image:: https://gstatic.com/cloudssh/images/open-btn.png + :target: https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/GoogleCloudPlatform/python-docs-samples&page=editor&open_in_editor=storage/cloud-client/snippets.py;storage/cloud-client/README.rst + + To run this sample: @@ -78,13 +90,13 @@ To run this sample: bucket_name {create-bucket,delete-bucket,get-bucket-labels,add-bucket-label,remove-bucket-label,list,list-with-prefix,upload,download,delete,metadata,make-public,signed-url,rename,copy} ... - + This application demonstrates how to perform basic operations on blobs (objects) in a Google Cloud Storage bucket. - + For more information, see the README.md under /storage and the documentation at https://cloud.google.com/storage/docs. - + positional arguments: bucket_name Your cloud storage bucket. {create-bucket,delete-bucket,get-bucket-labels,add-bucket-label,remove-bucket-label,list,list-with-prefix,upload,download,delete,metadata,make-public,signed-url,rename,copy} @@ -117,14 +129,19 @@ To run this sample: Google Cloud SDK. rename Renames a blob. copy Renames a blob. - + optional arguments: -h, --help show this help message and exit + Access Control Lists +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +.. image:: https://gstatic.com/cloudssh/images/open-btn.png + :target: https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/GoogleCloudPlatform/python-docs-samples&page=editor&open_in_editor=storage/cloud-client/acl.py;storage/cloud-client/README.rst + + To run this sample: @@ -136,13 +153,13 @@ To run this sample: usage: acl.py [-h] {print-bucket-acl,print-bucket-acl-for-user,add-bucket-owner,remove-bucket-owner,add-bucket-default-owner,remove-bucket-default-owner,print-blob-acl,print-blob-acl-for-user,add-blob-owner,remove-blob-owner} ... - + This application demonstrates how to manage access control lists (acls) in Google Cloud Storage. - + For more information, see the README.md under /storage and the documentation at https://cloud.google.com/storage/docs/encryption. - + positional arguments: {print-bucket-acl,print-bucket-acl-for-user,add-bucket-owner,remove-bucket-owner,add-bucket-default-owner,remove-bucket-default-owner,print-blob-acl,print-blob-acl-for-user,add-blob-owner,remove-blob-owner} print-bucket-acl Prints out a bucket's access control list. @@ -165,14 +182,19 @@ To run this sample: add-blob-owner Adds a user as an owner on the given blob. remove-blob-owner Removes a user from the access control list of the given blob in the given bucket. - + optional arguments: -h, --help show this help message and exit + Customer-Supplied Encryption +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +.. image:: https://gstatic.com/cloudssh/images/open-btn.png + :target: https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/GoogleCloudPlatform/python-docs-samples&page=editor&open_in_editor=storage/cloud-client/encryption.py;storage/cloud-client/README.rst + + To run this sample: @@ -182,19 +204,19 @@ To run this sample: $ python encryption.py usage: encryption.py [-h] {generate-encryption-key,upload,download,rotate} ... - + This application demonstrates how to upload and download encrypted blobs (objects) in Google Cloud Storage. - + Use `generate-encryption-key` to generate an example key: - + python encryption.py generate-encryption-key - + Then use the key to upload and download files encrypted with a custom key. - + For more information, see the README.md under /storage and the documentation at https://cloud.google.com/storage/docs/encryption. - + positional arguments: {generate-encryption-key,upload,download,rotate} generate-encryption-key @@ -212,14 +234,19 @@ To run this sample: same key provided when uploading the blob. rotate Performs a key rotation by re-writing an encrypted blob with a new encryption key. - + optional arguments: -h, --help show this help message and exit + Notification Polling +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +.. image:: https://gstatic.com/cloudssh/images/open-btn.png + :target: https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/GoogleCloudPlatform/python-docs-samples&page=editor&open_in_editor=storage/cloud-client/notification_polling.py;storage/cloud-client/README.rst + + To run this sample: @@ -229,50 +256,51 @@ To run this sample: $ python notification_polling.py usage: notification_polling.py [-h] project subscription - + This application demonstrates how to poll for GCS notifications from a Cloud Pub/Sub subscription, parse the incoming message, and acknowledge the successful processing of the message. - + This application will work with any subscription configured for pull rather than push notifications. If you do not already have notifications configured, you may consult the docs at https://cloud.google.com/storage/docs/reporting-changes or follow the steps below: - + 1. First, follow the common setup steps for these snippets, specically configuring auth and installing dependencies. See the README's "Setup" section. - + 2. Activate the Google Cloud Pub/Sub API, if you have not already done so. https://console.cloud.google.com/flows/enableapi?apiid=pubsub - + 3. Create a Google Cloud Storage bucket: $ gsutil mb gs://testbucket - + 4. Create a Cloud Pub/Sub topic and publish bucket notifications there: $ gsutil notification create -f json -t testtopic gs://testbucket - + 5. Create a subscription for your new topic: $ gcloud beta pubsub subscriptions create testsubscription --topic=testtopic - + 6. Run this program: $ python notification_polling.py my-project-id testsubscription - + 7. While the program is running, upload and delete some files in the testbucket bucket (you could use the console or gsutil) and watch as changes scroll by in the app. - + positional arguments: project The ID of the project that owns the subscription subscription The ID of the Pub/Sub subscription - + optional arguments: -h, --help show this help message and exit + The client library ------------------------------------------------------------------------------- diff --git a/storage/cloud-client/README.rst.in b/storage/cloud-client/README.rst.in index aa9690abe13f..bae062df644f 100644 --- a/storage/cloud-client/README.rst.in +++ b/storage/cloud-client/README.rst.in @@ -29,3 +29,5 @@ samples: show_help: true cloud_client_library: true + +folder: storage/cloud-client \ No newline at end of file diff --git a/storage/transfer_service/README.rst b/storage/transfer_service/README.rst index ab3771203b6d..1d77c18e48fa 100644 --- a/storage/transfer_service/README.rst +++ b/storage/transfer_service/README.rst @@ -3,6 +3,10 @@ Google Cloud Storage Python Samples =============================================================================== +.. image:: https://gstatic.com/cloudssh/images/open-btn.png + :target: https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/GoogleCloudPlatform/python-docs-samples&page=editor&open_in_editor=storage/transfer_service/README.rst + + This directory contains samples for Google Cloud Storage. `Google Cloud Storage`_ allows world-wide storage and retrieval of any amount of data at any time. @@ -55,6 +59,10 @@ Samples Transfer to GCS Nearline +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +.. image:: https://gstatic.com/cloudssh/images/open-btn.png + :target: https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/GoogleCloudPlatform/python-docs-samples&page=editor&open_in_editor=storage/transfer_service/nearline_request.py;storage/transfer_service/README.rst + + To run this sample: @@ -66,16 +74,16 @@ To run this sample: usage: nearline_request.py [-h] description project_id date time source_bucket sink_bucket - + Command-line sample that creates a one-time transfer from Google Cloud Storage standard class to the Nearline storage class." - + This sample is used on this page: - + https://cloud.google.com/storage/transfer/create-transfer - + For more information, see README.md. - + positional arguments: description Transfer description. project_id Your Google Cloud project ID. @@ -83,14 +91,19 @@ To run this sample: time Time (24hr) HH:MM. source_bucket Source bucket name. sink_bucket Sink bucket name. - + optional arguments: -h, --help show this help message and exit + Transfer from AWS +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +.. image:: https://gstatic.com/cloudssh/images/open-btn.png + :target: https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/GoogleCloudPlatform/python-docs-samples&page=editor&open_in_editor=storage/transfer_service/aws_request.py;storage/transfer_service/README.rst + + To run this sample: @@ -102,16 +115,16 @@ To run this sample: usage: aws_request.py [-h] description project_id date time source_bucket access_key secret_access_key sink_bucket - + Command-line sample that creates a one-time transfer from Amazon S3 to Google Cloud Storage. - + This sample is used on this page: - + https://cloud.google.com/storage/transfer/create-transfer - + For more information, see README.md. - + positional arguments: description Transfer description. project_id Your Google Cloud project ID. @@ -121,14 +134,19 @@ To run this sample: access_key Your AWS access key id. secret_access_key Your AWS secret access key. sink_bucket Sink bucket name. - + optional arguments: -h, --help show this help message and exit + Check transfer status +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +.. image:: https://gstatic.com/cloudssh/images/open-btn.png + :target: https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/GoogleCloudPlatform/python-docs-samples&page=editor&open_in_editor=storage/transfer_service/transfer_check.py;storage/transfer_service/README.rst + + To run this sample: @@ -138,23 +156,24 @@ To run this sample: $ python transfer_check.py usage: transfer_check.py [-h] project_id job_name - + Command-line sample that checks the status of an in-process transfer. - + This sample is used on this page: - + https://cloud.google.com/storage/transfer/create-transfer - + For more information, see README.md. - + positional arguments: project_id Your Google Cloud project ID. job_name Your job name. - + optional arguments: -h, --help show this help message and exit + .. _Google Cloud SDK: https://cloud.google.com/sdk/ \ No newline at end of file diff --git a/storage/transfer_service/README.rst.in b/storage/transfer_service/README.rst.in index 5b76f4005dfc..5d834e70ef48 100644 --- a/storage/transfer_service/README.rst.in +++ b/storage/transfer_service/README.rst.in @@ -26,3 +26,5 @@ samples: - name: Check transfer status file: transfer_check.py show_help: true + +folder: storage/transfer_service \ No newline at end of file diff --git a/tasks/README.md b/tasks/README.md index 012c56efad51..ddba20decb21 100644 --- a/tasks/README.md +++ b/tasks/README.md @@ -1,5 +1,10 @@ # Google Cloud Tasks Pull Queue Samples +[![Open in Cloud Shell][shell_img]][shell_link] + +[shell_img]: http://gstatic.com/cloudssh/images/open-btn.png +[shell_link]: https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/GoogleCloudPlatform/python-docs-samples&page=editor&open_in_editor=tasks/README.md + Sample command-line program for interacting with the Google Cloud Tasks API using pull queues. diff --git a/translate/cloud-client/README.rst b/translate/cloud-client/README.rst index b4582262b3ac..ae63d9105c2f 100644 --- a/translate/cloud-client/README.rst +++ b/translate/cloud-client/README.rst @@ -3,6 +3,10 @@ Google Translation API Python Samples =============================================================================== +.. image:: https://gstatic.com/cloudssh/images/open-btn.png + :target: https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/GoogleCloudPlatform/python-docs-samples&page=editor&open_in_editor=translate/cloud-client/README.rst + + This directory contains samples for Google Translation API. With `Google Translation API`, you can dynamically translate text between thousands of language pairs. @@ -54,6 +58,10 @@ Samples Quickstart +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +.. image:: https://gstatic.com/cloudssh/images/open-btn.png + :target: https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/GoogleCloudPlatform/python-docs-samples&page=editor&open_in_editor=translate/cloud-client/quickstart.py;translate/cloud-client/README.rst + + To run this sample: @@ -66,6 +74,10 @@ To run this sample: Snippets +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +.. image:: https://gstatic.com/cloudssh/images/open-btn.png + :target: https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/GoogleCloudPlatform/python-docs-samples&page=editor&open_in_editor=translate/cloud-client/snippets.py;translate/cloud-client/README.rst + + To run this sample: @@ -77,13 +89,13 @@ To run this sample: usage: snippets.py [-h] {detect-language,list-languages,list-languages-with-target,translate-text} ... - + This application demonstrates how to perform basic operations with the Google Cloud Translate API - + For more information, the documentation at https://cloud.google.com/translate/docs. - + positional arguments: {detect-language,list-languages,list-languages-with-target,translate-text} detect-language Detects the text's language. @@ -97,13 +109,14 @@ To run this sample: be an ISO 639-1 language code. See https://g.co/cloud/translate/v2/translate- reference#supported_languages - + optional arguments: -h, --help show this help message and exit + The client library ------------------------------------------------------------------------------- diff --git a/translate/cloud-client/README.rst.in b/translate/cloud-client/README.rst.in index c6b27a36b4af..a2483218cc40 100644 --- a/translate/cloud-client/README.rst.in +++ b/translate/cloud-client/README.rst.in @@ -20,3 +20,5 @@ samples: show_help: true cloud_client_library: true + +folder: translate/cloud-client \ No newline at end of file diff --git a/video/cloud-client/analyze/README.rst b/video/cloud-client/analyze/README.rst index 1b55c7e77812..519822257809 100644 --- a/video/cloud-client/analyze/README.rst +++ b/video/cloud-client/analyze/README.rst @@ -3,6 +3,10 @@ Google Cloud Video Intelligence API Python Samples =============================================================================== +.. image:: https://gstatic.com/cloudssh/images/open-btn.png + :target: https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/GoogleCloudPlatform/python-docs-samples&page=editor&open_in_editor=video/cloud-client/analyze/README.rst + + This directory contains samples for Google Cloud Video Intelligence API. `Google Cloud Video Intelligence API`_ allows developers to easily integrate feature detection in video. @@ -54,6 +58,10 @@ Samples analyze +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +.. image:: https://gstatic.com/cloudssh/images/open-btn.png + :target: https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/GoogleCloudPlatform/python-docs-samples&page=editor&open_in_editor=video/cloud-client/analyze/analyze.py;video/cloud-client/analyze/README.rst + + To run this sample: @@ -63,32 +71,33 @@ To run this sample: $ python analyze.py usage: analyze.py [-h] {faces,labels,labels_file,explicit_content,shots} ... - + This application demonstrates face detection, label detection, explicit content, and shot change detection using the Google Cloud API. - + Usage Examples: - + python analyze.py faces gs://demomaker/google_gmail.mp4 python analyze.py labels gs://cloud-ml-sandbox/video/chicago.mp4 python analyze.py labels_file resources/cat.mp4 python analyze.py shots gs://demomaker/gbikes_dinosaur.mp4 python analyze.py explicit_content gs://demomaker/gbikes_dinosaur.mp4 - + positional arguments: {faces,labels,labels_file,explicit_content,shots} faces Detects faces given a GCS path. labels Detects labels given a GCS path. - labels_file Detects labels given a file path. + labels_file Detect labels given a file path. explicit_content Detects explicit content from the GCS path to a video. shots Detects camera shot changes. - + optional arguments: -h, --help show this help message and exit + The client library ------------------------------------------------------------------------------- diff --git a/video/cloud-client/analyze/README.rst.in b/video/cloud-client/analyze/README.rst.in index 4249d48aed52..5dc673c1fe1a 100644 --- a/video/cloud-client/analyze/README.rst.in +++ b/video/cloud-client/analyze/README.rst.in @@ -18,3 +18,5 @@ samples: show_help: True cloud_client_library: true + +folder: video/cloud-client/analyze \ No newline at end of file diff --git a/video/cloud-client/analyze/resources/README.md b/video/cloud-client/analyze/resources/README.md index a88a180da90b..e33d7137c4f6 100644 --- a/video/cloud-client/analyze/resources/README.md +++ b/video/cloud-client/analyze/resources/README.md @@ -1,5 +1,10 @@ # Resources folder for local files +[![Open in Cloud Shell][shell_img]][shell_link] + +[shell_img]: http://gstatic.com/cloudssh/images/open-btn.png +[shell_link]: https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/GoogleCloudPlatform/python-docs-samples&page=editor&open_in_editor=video/cloud-client/analyze/resources/README.md + Copy from Google Cloud Storage to this folder for testing video analysis of local files. For `cat.mp4` used in the usage example, run the following `gcloud` command. diff --git a/video/cloud-client/faces/README.rst b/video/cloud-client/faces/README.rst index 3db153e6cf58..1102e5f1e06f 100644 --- a/video/cloud-client/faces/README.rst +++ b/video/cloud-client/faces/README.rst @@ -3,6 +3,10 @@ Google Cloud Video Intelligence API Python Samples =============================================================================== +.. image:: https://gstatic.com/cloudssh/images/open-btn.png + :target: https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/GoogleCloudPlatform/python-docs-samples&page=editor&open_in_editor=video/cloud-client/faces/README.rst + + This directory contains samples for Google Cloud Video Intelligence API. `Google Cloud Video Intelligence API`_ allows developers to easily integrate feature detection in video. @@ -54,6 +58,10 @@ Samples faces +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +.. image:: https://gstatic.com/cloudssh/images/open-btn.png + :target: https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/GoogleCloudPlatform/python-docs-samples&page=editor&open_in_editor=video/cloud-client/faces/faces.py;video/cloud-client/faces/README.rst + + To run this sample: @@ -63,26 +71,27 @@ To run this sample: $ python faces.py usage: faces.py [-h] path - - This application demonstrates how to perform shot change detection with the - Google Cloud Video Intelligence API. - + + This application demonstrates how to perform face + detection with the Google Cloud Video Intelligence API. + For more information, check out the documentation at https://cloud.google.com/videointelligence/docs. - + Usage Example: - + python faces.py gs://demomaker/google_gmail.mp4 - + positional arguments: path GCS file path for face detection. - + optional arguments: -h, --help show this help message and exit + The client library ------------------------------------------------------------------------------- diff --git a/video/cloud-client/faces/README.rst.in b/video/cloud-client/faces/README.rst.in index 3ca6fd6eb540..1eb41699c223 100644 --- a/video/cloud-client/faces/README.rst.in +++ b/video/cloud-client/faces/README.rst.in @@ -18,3 +18,5 @@ samples: show_help: True cloud_client_library: true + +folder: video/cloud-client/faces \ No newline at end of file diff --git a/video/cloud-client/labels/README.rst b/video/cloud-client/labels/README.rst index 54b8f851fe67..7eae148093f8 100644 --- a/video/cloud-client/labels/README.rst +++ b/video/cloud-client/labels/README.rst @@ -3,6 +3,10 @@ Google Cloud Video Intelligence API Python Samples =============================================================================== +.. image:: https://gstatic.com/cloudssh/images/open-btn.png + :target: https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/GoogleCloudPlatform/python-docs-samples&page=editor&open_in_editor=video/cloud-client/labels/README.rst + + This directory contains samples for Google Cloud Video Intelligence API. `Google Cloud Video Intelligence API`_ allows developers to easily integrate feature detection in video. @@ -54,6 +58,10 @@ Samples labels +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +.. image:: https://gstatic.com/cloudssh/images/open-btn.png + :target: https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/GoogleCloudPlatform/python-docs-samples&page=editor&open_in_editor=video/cloud-client/labels/labels.py;video/cloud-client/labels/README.rst + + To run this sample: @@ -63,26 +71,28 @@ To run this sample: $ python labels.py usage: labels.py [-h] path - - This application demonstrates how to perform basic operations with the - Google Cloud Video Intelligence API. - + + This application demonstrates how to detect labels from a video + based on the image content with the Google Cloud Video Intelligence + API. + For more information, check out the documentation at https://cloud.google.com/videointelligence/docs. - + Usage Example: - + python labels.py gs://cloud-ml-sandbox/video/chicago.mp4 - + positional arguments: path GCS file path for label detection. - + optional arguments: -h, --help show this help message and exit + The client library ------------------------------------------------------------------------------- diff --git a/video/cloud-client/labels/README.rst.in b/video/cloud-client/labels/README.rst.in index d5755799b935..2d6b97cf6e6c 100644 --- a/video/cloud-client/labels/README.rst.in +++ b/video/cloud-client/labels/README.rst.in @@ -18,3 +18,5 @@ samples: show_help: True cloud_client_library: true + +folder: video/cloud-client/labels \ No newline at end of file diff --git a/video/cloud-client/quickstart/README.rst b/video/cloud-client/quickstart/README.rst index 44c5c72042cb..6c095e25be62 100644 --- a/video/cloud-client/quickstart/README.rst +++ b/video/cloud-client/quickstart/README.rst @@ -3,6 +3,10 @@ Google Cloud Video Intelligence API Python Samples =============================================================================== +.. image:: https://gstatic.com/cloudssh/images/open-btn.png + :target: https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/GoogleCloudPlatform/python-docs-samples&page=editor&open_in_editor=video/cloud-client/quickstart/README.rst + + This directory contains samples for Google Cloud Video Intelligence API. `Google Cloud Video Intelligence API`_ allows developers to easily integrate feature detection in video. @@ -54,6 +58,10 @@ Samples quickstart +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +.. image:: https://gstatic.com/cloudssh/images/open-btn.png + :target: https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/GoogleCloudPlatform/python-docs-samples&page=editor&open_in_editor=video/cloud-client/quickstart/quickstart.py;video/cloud-client/quickstart/README.rst + + To run this sample: diff --git a/video/cloud-client/quickstart/README.rst.in b/video/cloud-client/quickstart/README.rst.in index 59014b4d5daf..9763ec6334a4 100644 --- a/video/cloud-client/quickstart/README.rst.in +++ b/video/cloud-client/quickstart/README.rst.in @@ -17,3 +17,5 @@ samples: file: quickstart.py cloud_client_library: true + +folder: video/cloud-client/quickstart \ No newline at end of file diff --git a/video/cloud-client/shotchange/README.rst b/video/cloud-client/shotchange/README.rst index 2a4de5e95f60..fd0041bcc5d3 100644 --- a/video/cloud-client/shotchange/README.rst +++ b/video/cloud-client/shotchange/README.rst @@ -3,6 +3,10 @@ Google Cloud Video Intelligence API Python Samples =============================================================================== +.. image:: https://gstatic.com/cloudssh/images/open-btn.png + :target: https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/GoogleCloudPlatform/python-docs-samples&page=editor&open_in_editor=video/cloud-client/shotchange/README.rst + + This directory contains samples for Google Cloud Video Intelligence API. `Google Cloud Video Intelligence API`_ allows developers to easily integrate feature detection in video. @@ -54,6 +58,10 @@ Samples Shot Change Detection +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +.. image:: https://gstatic.com/cloudssh/images/open-btn.png + :target: https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/GoogleCloudPlatform/python-docs-samples&page=editor&open_in_editor=video/cloud-client/shotchange/shotchange.py;video/cloud-client/shotchange/README.rst + + To run this sample: @@ -63,26 +71,27 @@ To run this sample: $ python shotchange.py usage: shotchange.py [-h] path - - This application demonstrates how to perform basic operations with the - Google Cloud Video Intelligence API. - + + This application demonstrates how to identify all different shots + in a video using the Google Cloud Video Intelligence API. + For more information, check out the documentation at https://cloud.google.com/videointelligence/docs. - + Example Usage: - + python shotchange.py gs://demomaker/gbikes_dinosaur.mp4 - + positional arguments: path GCS path for shot change detection. - + optional arguments: -h, --help show this help message and exit + The client library ------------------------------------------------------------------------------- diff --git a/video/cloud-client/shotchange/README.rst.in b/video/cloud-client/shotchange/README.rst.in index 9512ecdc2b86..6463d192f72b 100644 --- a/video/cloud-client/shotchange/README.rst.in +++ b/video/cloud-client/shotchange/README.rst.in @@ -18,3 +18,5 @@ samples: show_help: True cloud_client_library: true + +folder: video/cloud-client/shotchange \ No newline at end of file diff --git a/vision/api/label/README.rst b/vision/api/label/README.rst index 8d8d5e76d6eb..cfd590c90fa2 100644 --- a/vision/api/label/README.rst +++ b/vision/api/label/README.rst @@ -3,6 +3,10 @@ Google Cloud Vision API Python Samples =============================================================================== +.. image:: https://gstatic.com/cloudssh/images/open-btn.png + :target: https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/GoogleCloudPlatform/python-docs-samples&page=editor&open_in_editor=vision/api/label/README.rst + + This directory contains samples for Google Cloud Vision API. `Google Cloud Vision API`_ allows developers to easily integrate vision detection features within applications, including image labeling, face and landmark detection, optical character recognition (OCR), and tagging of explicit content @@ -55,6 +59,10 @@ Samples Label detection +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +.. image:: https://gstatic.com/cloudssh/images/open-btn.png + :target: https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/GoogleCloudPlatform/python-docs-samples&page=editor&open_in_editor=vision/api/label/label.py;vision/api/label/README.rst + + To run this sample: @@ -64,14 +72,15 @@ To run this sample: $ python label.py usage: label.py [-h] image_file - + positional arguments: image_file The image you'd like to label. - + optional arguments: -h, --help show this help message and exit + .. _Google Cloud SDK: https://cloud.google.com/sdk/ \ No newline at end of file diff --git a/vision/api/label/README.rst.in b/vision/api/label/README.rst.in index 5f39a0442817..7a8a16a031f9 100644 --- a/vision/api/label/README.rst.in +++ b/vision/api/label/README.rst.in @@ -22,3 +22,5 @@ samples: - name: Label detection file: label.py show_help: true + +folder: vision/api/label \ No newline at end of file diff --git a/vision/cloud-client/crop_hints/README.rst b/vision/cloud-client/crop_hints/README.rst index 448b1e31f9a3..9dfd4084c0bc 100644 --- a/vision/cloud-client/crop_hints/README.rst +++ b/vision/cloud-client/crop_hints/README.rst @@ -3,6 +3,10 @@ Google Cloud Vision API Python Samples =============================================================================== +.. image:: https://gstatic.com/cloudssh/images/open-btn.png + :target: https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/GoogleCloudPlatform/python-docs-samples&page=editor&open_in_editor=vision/cloud-client/crop_hints/README.rst + + This directory contains samples for Google Cloud Vision API. `Google Cloud Vision API`_ allows developers to easily integrate vision detection features within applications, including image labeling, face and landmark detection, optical character recognition (OCR), and tagging of explicit content. - See the `migration guide`_ for information about migrating to Python client library v0.25.1. @@ -58,6 +62,10 @@ Samples Crop Hints Tutorial +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +.. image:: https://gstatic.com/cloudssh/images/open-btn.png + :target: https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/GoogleCloudPlatform/python-docs-samples&page=editor&open_in_editor=vision/cloud-client/crop_hints/crop_hints.py;vision/cloud-client/crop_hints/README.rst + + To run this sample: @@ -67,17 +75,18 @@ To run this sample: $ python crop_hints.py usage: crop_hints.py [-h] image_file mode - + positional arguments: image_file The image you'd like to crop. mode Set to "crop" or "draw". - + optional arguments: -h, --help show this help message and exit + The client library ------------------------------------------------------------------------------- diff --git a/vision/cloud-client/crop_hints/README.rst.in b/vision/cloud-client/crop_hints/README.rst.in index 80ce77589d1a..113d27710441 100644 --- a/vision/cloud-client/crop_hints/README.rst.in +++ b/vision/cloud-client/crop_hints/README.rst.in @@ -26,3 +26,5 @@ samples: show_help: True cloud_client_library: true + +folder: vision/cloud-client/crop_hints \ No newline at end of file diff --git a/vision/cloud-client/detect/README.rst b/vision/cloud-client/detect/README.rst index d1c27524f2e0..e0d7a6f28784 100644 --- a/vision/cloud-client/detect/README.rst +++ b/vision/cloud-client/detect/README.rst @@ -3,6 +3,10 @@ Google Cloud Vision API Python Samples =============================================================================== +.. image:: https://gstatic.com/cloudssh/images/open-btn.png + :target: https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/GoogleCloudPlatform/python-docs-samples&page=editor&open_in_editor=vision/cloud-client/detect/README.rst + + This directory contains samples for Google Cloud Vision API. `Google Cloud Vision API`_ allows developers to easily integrate vision detection features within applications, including image labeling, face and landmark detection, optical character recognition (OCR), and tagging of explicit content. - See the `migration guide`_ for information about migrating to Python client library v0.25.1. @@ -58,6 +62,10 @@ Samples Detect +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +.. image:: https://gstatic.com/cloudssh/images/open-btn.png + :target: https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/GoogleCloudPlatform/python-docs-samples&page=editor&open_in_editor=vision/cloud-client/detect/detect.py;vision/cloud-client/detect/README.rst + + To run this sample: @@ -69,20 +77,20 @@ To run this sample: usage: detect.py [-h] {faces,faces-uri,labels,labels-uri,landmarks,landmarks-uri,text,text-uri,logos,logos-uri,safe-search,safe-search-uri,properties,properties-uri,web,web-uri,crophints,crophints-uri,document,document-uri} ... - + This application demonstrates how to perform basic operations with the Google Cloud Vision API. - + Example Usage: python detect.py text ./resources/wakeupcat.jpg python detect.py labels ./resources/landmark.jpg python detect.py web ./resources/landmark.jpg python detect.py web-uri http://wheresgus.com/dog.JPG python detect.py faces-uri gs://your-bucket/file.jpg - + For more information, the documentation at https://cloud.google.com/vision/docs. - + positional arguments: {faces,faces-uri,labels,labels-uri,landmarks,landmarks-uri,text,text-uri,logos,logos-uri,safe-search,safe-search-uri,properties,properties-uri,web,web-uri,crophints,crophints-uri,document,document-uri} faces Detects faces in an image. @@ -115,13 +123,14 @@ To run this sample: document Detects document features in an image. document-uri Detects document features in the file located in Google Cloud Storage. - + optional arguments: -h, --help show this help message and exit + The client library ------------------------------------------------------------------------------- diff --git a/vision/cloud-client/detect/README.rst.in b/vision/cloud-client/detect/README.rst.in index 5ffe212923cd..82be88ffde5f 100644 --- a/vision/cloud-client/detect/README.rst.in +++ b/vision/cloud-client/detect/README.rst.in @@ -26,3 +26,5 @@ samples: show_help: True cloud_client_library: true + +folder: vision/cloud-client/detect \ No newline at end of file diff --git a/vision/cloud-client/document_text/README.rst b/vision/cloud-client/document_text/README.rst index 5ae0ecf664fb..691ae14b0997 100644 --- a/vision/cloud-client/document_text/README.rst +++ b/vision/cloud-client/document_text/README.rst @@ -3,6 +3,10 @@ Google Cloud Vision API Python Samples =============================================================================== +.. image:: https://gstatic.com/cloudssh/images/open-btn.png + :target: https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/GoogleCloudPlatform/python-docs-samples&page=editor&open_in_editor=vision/cloud-client/document_text/README.rst + + This directory contains samples for Google Cloud Vision API. `Google Cloud Vision API`_ allows developers to easily integrate vision detection features within applications, including image labeling, face and landmark detection, optical character recognition (OCR), and tagging of explicit content. - See the `migration guide`_ for information about migrating to Python client library v0.25.1. @@ -58,6 +62,10 @@ Samples Document Text tutorial +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +.. image:: https://gstatic.com/cloudssh/images/open-btn.png + :target: https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/GoogleCloudPlatform/python-docs-samples&page=editor&open_in_editor=vision/cloud-client/document_text/doctext.py;vision/cloud-client/document_text/README.rst + + To run this sample: @@ -67,10 +75,10 @@ To run this sample: $ python doctext.py usage: doctext.py [-h] [-out_file OUT_FILE] detect_file - + positional arguments: detect_file The image for text detection. - + optional arguments: -h, --help show this help message and exit -out_file OUT_FILE Optional output file @@ -78,6 +86,7 @@ To run this sample: + The client library ------------------------------------------------------------------------------- diff --git a/vision/cloud-client/document_text/README.rst.in b/vision/cloud-client/document_text/README.rst.in index d4353ca03896..4746e327eca7 100644 --- a/vision/cloud-client/document_text/README.rst.in +++ b/vision/cloud-client/document_text/README.rst.in @@ -26,3 +26,5 @@ samples: show_help: True cloud_client_library: true + +folder: vision/cloud-client/document_text \ No newline at end of file diff --git a/vision/cloud-client/face_detection/README.rst b/vision/cloud-client/face_detection/README.rst index e3242d930289..56eb6657f22b 100644 --- a/vision/cloud-client/face_detection/README.rst +++ b/vision/cloud-client/face_detection/README.rst @@ -3,6 +3,10 @@ Google Cloud Vision API Python Samples =============================================================================== +.. image:: https://gstatic.com/cloudssh/images/open-btn.png + :target: https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/GoogleCloudPlatform/python-docs-samples&page=editor&open_in_editor=vision/cloud-client/face_detection/README.rst + + This directory contains samples for Google Cloud Vision API. `Google Cloud Vision API`_ allows developers to easily integrate vision detection features within applications, including image labeling, face and landmark detection, optical character recognition (OCR), and tagging of explicit content. - See the `migration guide`_ for information about migrating to Python client library v0.25.1. @@ -59,6 +63,10 @@ Samples Face detection +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +.. image:: https://gstatic.com/cloudssh/images/open-btn.png + :target: https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/GoogleCloudPlatform/python-docs-samples&page=editor&open_in_editor=vision/cloud-client/face_detection/faces.py;vision/cloud-client/face_detection/README.rst + + To run this sample: @@ -68,12 +76,12 @@ To run this sample: $ python faces.py usage: faces.py [-h] [--out OUTPUT] [--max-results MAX_RESULTS] input_image - + Detects faces in the given image. - + positional arguments: input_image the image you'd like to detect faces in. - + optional arguments: -h, --help show this help message and exit --out OUTPUT the name of the output file. @@ -83,4 +91,5 @@ To run this sample: + .. _Google Cloud SDK: https://cloud.google.com/sdk/ \ No newline at end of file diff --git a/vision/cloud-client/face_detection/README.rst.in b/vision/cloud-client/face_detection/README.rst.in index deb0a87b21b0..422cec1d11da 100644 --- a/vision/cloud-client/face_detection/README.rst.in +++ b/vision/cloud-client/face_detection/README.rst.in @@ -27,3 +27,5 @@ samples: - name: Face detection file: faces.py show_help: true + +folder: vision/cloud-client/face_detection \ No newline at end of file diff --git a/vision/cloud-client/quickstart/README.rst b/vision/cloud-client/quickstart/README.rst index 5e7302a00254..5824b9eae7c1 100644 --- a/vision/cloud-client/quickstart/README.rst +++ b/vision/cloud-client/quickstart/README.rst @@ -3,6 +3,10 @@ Google Cloud Vision API Python Samples =============================================================================== +.. image:: https://gstatic.com/cloudssh/images/open-btn.png + :target: https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/GoogleCloudPlatform/python-docs-samples&page=editor&open_in_editor=vision/cloud-client/quickstart/README.rst + + This directory contains samples for Google Cloud Vision API. `Google Cloud Vision API`_ allows developers to easily integrate vision detection features within applications, including image labeling, face and landmark detection, optical character recognition (OCR), and tagging of explicit content. - See the `migration guide`_ for information about migrating to Python client library v0.25.1. @@ -58,6 +62,10 @@ Samples Quickstart +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +.. image:: https://gstatic.com/cloudssh/images/open-btn.png + :target: https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/GoogleCloudPlatform/python-docs-samples&page=editor&open_in_editor=vision/cloud-client/quickstart/quickstart.py;vision/cloud-client/quickstart/README.rst + + To run this sample: diff --git a/vision/cloud-client/quickstart/README.rst.in b/vision/cloud-client/quickstart/README.rst.in index e5e32beabcfd..bd650a6cb6f0 100644 --- a/vision/cloud-client/quickstart/README.rst.in +++ b/vision/cloud-client/quickstart/README.rst.in @@ -25,3 +25,5 @@ samples: file: quickstart.py cloud_client_library: true + +folder: vision/cloud-client/quickstart \ No newline at end of file diff --git a/vision/cloud-client/web/README.rst b/vision/cloud-client/web/README.rst index 7a7d8a235667..07e572f3d774 100644 --- a/vision/cloud-client/web/README.rst +++ b/vision/cloud-client/web/README.rst @@ -3,6 +3,10 @@ Google Cloud Vision API Python Samples =============================================================================== +.. image:: https://gstatic.com/cloudssh/images/open-btn.png + :target: https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/GoogleCloudPlatform/python-docs-samples&page=editor&open_in_editor=vision/cloud-client/web/README.rst + + This directory contains samples for Google Cloud Vision API. `Google Cloud Vision API`_ allows developers to easily integrate vision detection features within applications, including image labeling, face and landmark detection, optical character recognition (OCR), and tagging of explicit content. - See the `migration guide`_ for information about migrating to Python client library v0.25.1. @@ -58,6 +62,10 @@ Samples Web +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +.. image:: https://gstatic.com/cloudssh/images/open-btn.png + :target: https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/GoogleCloudPlatform/python-docs-samples&page=editor&open_in_editor=vision/cloud-client/web/web_detect.py;vision/cloud-client/web/README.rst + + To run this sample: @@ -67,24 +75,25 @@ To run this sample: $ python web_detect.py usage: web_detect.py [-h] image_url - + Demonstrates web detection using the Google Cloud Vision API. - + Example usage: python web_detect.py https://goo.gl/X4qcB6 python web_detect.py ../detect/resources/landmark.jpg python web_detect.py gs://your-bucket/image.png - + positional arguments: image_url The image to detect, can be web URI, Google Cloud Storage, or path to local file. - + optional arguments: -h, --help show this help message and exit + The client library ------------------------------------------------------------------------------- diff --git a/vision/cloud-client/web/README.rst.in b/vision/cloud-client/web/README.rst.in index 0f4cf78487af..8b8533b52614 100644 --- a/vision/cloud-client/web/README.rst.in +++ b/vision/cloud-client/web/README.rst.in @@ -26,3 +26,5 @@ samples: show_help: True cloud_client_library: true + +folder: vision/cloud-client/web \ No newline at end of file