From b838677968380ae855e39aaf3096e99e6db88bd7 Mon Sep 17 00:00:00 2001 From: wesley chun Date: Sat, 22 May 2021 00:01:25 +0000 Subject: [PATCH 1/9] connect Python Translate client library to nebulous serverless example --- samples/cloud-nebulous-serverless-python/README.md | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 samples/cloud-nebulous-serverless-python/README.md diff --git a/samples/cloud-nebulous-serverless-python/README.md b/samples/cloud-nebulous-serverless-python/README.md new file mode 100644 index 00000000..a5e2db6d --- /dev/null +++ b/samples/cloud-nebulous-serverless-python/README.md @@ -0,0 +1,3 @@ +For a sample Python "mini-Google Translate" web app using the [Google Cloud Translation API](https://cloud.google.com/translate), go to https://github.com/googlecodelabs/cloud-nebulous-serverless-python + +The app can be deployed locally via the Flask development server, or to any [Google Cloud serverless](https://cloud.google.com/serverless) compute platforms, [Google App Engine](https://cloud.google.com/appengine), [Cloud Functions](https://cloud.google.com/functions), or [Cloud Run](https://cloud.google.com/run), with just minor configuration changes. From 3ef4b9a71c76f06c9954f56aeb24f73e0096a4fe Mon Sep 17 00:00:00 2001 From: wesley chun Date: Sat, 22 May 2021 03:30:26 +0000 Subject: [PATCH 2/9] added Samples section to README --- README.rst | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/README.rst b/README.rst index 2d09f147..d9c7f8fb 100644 --- a/README.rst +++ b/README.rst @@ -82,4 +82,20 @@ Windows pip install virtualenv virtualenv \Scripts\activate - \Scripts\pip.exe install google-cloud-translate \ No newline at end of file + \Scripts\pip.exe install google-cloud-translate + +Samples +----------- + +The `samples`_ folder contains all of the Cloud Translation API code snippets +found in `its documentation`_ as well as complete sample apps utilizing the API: + +- `"Mini Google Translate MVP" Flask web app`_ — any host or Google Cloud: `App Engine`_, `Cloud Functions`_, or `Cloud Run`_ + +.. _samples: /tree/master/samples +.. _its documentation: https://cloud.google.com/translate/docs +.. _"Mini Google Translate MVP" web app: https://github.com/googlecodelabs/cloud-nebulous-serverless-python +.. _App Engine: https://cloud.google.com/appengine +.. _Cloud Functions: https://cloud.google.com/functions +.. _Cloud Run: https://cloud.google.com/run + From 6228670e27279e1ddc828b9d420de718d77ee4b6 Mon Sep 17 00:00:00 2001 From: wesley chun Date: Sat, 22 May 2021 03:37:20 +0000 Subject: [PATCH 3/9] fix path --- README.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.rst b/README.rst index d9c7f8fb..09b11b27 100644 --- a/README.rst +++ b/README.rst @@ -92,7 +92,7 @@ found in `its documentation`_ as well as complete sample apps utilizing the API: - `"Mini Google Translate MVP" Flask web app`_ — any host or Google Cloud: `App Engine`_, `Cloud Functions`_, or `Cloud Run`_ -.. _samples: /tree/master/samples +.. _samples: samples .. _its documentation: https://cloud.google.com/translate/docs .. _"Mini Google Translate MVP" web app: https://github.com/googlecodelabs/cloud-nebulous-serverless-python .. _App Engine: https://cloud.google.com/appengine From b2b6fbee26770a8afadf8721cd542c176a67c933 Mon Sep 17 00:00:00 2001 From: wesley chun Date: Sat, 22 May 2021 03:43:52 +0000 Subject: [PATCH 4/9] update README --- samples/cloud-nebulous-serverless-python/README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/samples/cloud-nebulous-serverless-python/README.md b/samples/cloud-nebulous-serverless-python/README.md index a5e2db6d..06ecda02 100644 --- a/samples/cloud-nebulous-serverless-python/README.md +++ b/samples/cloud-nebulous-serverless-python/README.md @@ -1,3 +1,3 @@ -For a sample Python "mini-Google Translate" web app using the [Google Cloud Translation API](https://cloud.google.com/translate), go to https://github.com/googlecodelabs/cloud-nebulous-serverless-python +For a complete sample Python "mini-Google Translate" web app using the [Google Cloud Translation API](https://cloud.google.com/translate), go to . -The app can be deployed locally via the Flask development server, or to any [Google Cloud serverless](https://cloud.google.com/serverless) compute platforms, [Google App Engine](https://cloud.google.com/appengine), [Cloud Functions](https://cloud.google.com/functions), or [Cloud Run](https://cloud.google.com/run), with just minor configuration changes. +In addition to local or hosting service deployments, the app can be deployed to any of the [Google Cloud serverless](https://cloud.google.com/serverless) compute platforms, [Google App Engine](https://cloud.google.com/appengine), [Cloud Functions](https://cloud.google.com/functions), or [Cloud Run](https://cloud.google.com/run), with just minor configuration changes. From 8f62ff7e3daa86496c115eabc76f809221e0f5de Mon Sep 17 00:00:00 2001 From: wesley chun Date: Sat, 22 May 2021 03:53:04 +0000 Subject: [PATCH 5/9] fix README link --- README.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.rst b/README.rst index 09b11b27..8ac36342 100644 --- a/README.rst +++ b/README.rst @@ -90,11 +90,11 @@ Samples The `samples`_ folder contains all of the Cloud Translation API code snippets found in `its documentation`_ as well as complete sample apps utilizing the API: -- `"Mini Google Translate MVP" Flask web app`_ — any host or Google Cloud: `App Engine`_, `Cloud Functions`_, or `Cloud Run`_ +- `"Mini Google Translate MVP" Flask web app`_ (any host or Google Cloud: `App Engine`_, `Cloud Functions`_, or `Cloud Run`_) .. _samples: samples .. _its documentation: https://cloud.google.com/translate/docs -.. _"Mini Google Translate MVP" web app: https://github.com/googlecodelabs/cloud-nebulous-serverless-python +.. _"Mini Google Translate MVP" Flask web app: samples/cloud-nebulous-serverless-python .. _App Engine: https://cloud.google.com/appengine .. _Cloud Functions: https://cloud.google.com/functions .. _Cloud Run: https://cloud.google.com/run From c8fd2143a6bffc95dde74d76e70b502b03226bbb Mon Sep 17 00:00:00 2001 From: wesley chun Date: Wed, 26 May 2021 18:36:20 +0000 Subject: [PATCH 6/9] move sample info to README --- README.rst | 11 ++++++++--- samples/cloud-nebulous-serverless-python/README.md | 4 +--- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/README.rst b/README.rst index 8ac36342..300860d1 100644 --- a/README.rst +++ b/README.rst @@ -88,13 +88,18 @@ Samples ----------- The `samples`_ folder contains all of the Cloud Translation API code snippets -found in `its documentation`_ as well as complete sample apps utilizing the API: +found in `its documentation`_ as well as complete sample apps: -- `"Mini Google Translate MVP" Flask web app`_ (any host or Google Cloud: `App Engine`_, `Cloud Functions`_, or `Cloud Run`_) +- `Mini-Google Translate "MVP"`_ app + - Shows how to use the API in a Python/Flask web app + - Deployable locally or any on-prem or cloud host supporting Flask apps + - Also deployable to `Google Cloud serverless hosting platforms`_: + - `App Engine`_, `Cloud Functions`_, or `Cloud Run`_ with only minor configuration changes .. _samples: samples .. _its documentation: https://cloud.google.com/translate/docs -.. _"Mini Google Translate MVP" Flask web app: samples/cloud-nebulous-serverless-python +.. _"Mini Google Translate MVP" Flask web app: https://github.com/googlecodelabs/cloud-nebulous-serverless-python +.. _Google Cloud serverless hosting platforms: https://cloud.google.com/serverless#serverless-products .. _App Engine: https://cloud.google.com/appengine .. _Cloud Functions: https://cloud.google.com/functions .. _Cloud Run: https://cloud.google.com/run diff --git a/samples/cloud-nebulous-serverless-python/README.md b/samples/cloud-nebulous-serverless-python/README.md index 06ecda02..9dfab667 100644 --- a/samples/cloud-nebulous-serverless-python/README.md +++ b/samples/cloud-nebulous-serverless-python/README.md @@ -1,3 +1 @@ -For a complete sample Python "mini-Google Translate" web app using the [Google Cloud Translation API](https://cloud.google.com/translate), go to . - -In addition to local or hosting service deployments, the app can be deployed to any of the [Google Cloud serverless](https://cloud.google.com/serverless) compute platforms, [Google App Engine](https://cloud.google.com/appengine), [Cloud Functions](https://cloud.google.com/functions), or [Cloud Run](https://cloud.google.com/run), with just minor configuration changes. +This sample can be found at . From 9f47ea7d48931d703b280f3143b8e5aabbcbd827 Mon Sep 17 00:00:00 2001 From: wesley chun Date: Wed, 26 May 2021 18:42:53 +0000 Subject: [PATCH 7/9] fix RST formatting --- README.rst | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/README.rst b/README.rst index 300860d1..0fc13703 100644 --- a/README.rst +++ b/README.rst @@ -90,15 +90,15 @@ Samples The `samples`_ folder contains all of the Cloud Translation API code snippets found in `its documentation`_ as well as complete sample apps: -- `Mini-Google Translate "MVP"`_ app +- `Mini Google Translate "MVP"`_ app + - Shows how to use the API in a Python/Flask web app - Deployable locally or any on-prem or cloud host supporting Flask apps - - Also deployable to `Google Cloud serverless hosting platforms`_: - - `App Engine`_, `Cloud Functions`_, or `Cloud Run`_ with only minor configuration changes + - Also deployable to `Google Cloud serverless hosting platforms`_ (`App Engine`_, `Cloud Functions`_, or `Cloud Run`_) with only minor configuration changes .. _samples: samples .. _its documentation: https://cloud.google.com/translate/docs -.. _"Mini Google Translate MVP" Flask web app: https://github.com/googlecodelabs/cloud-nebulous-serverless-python +.. _Mini Google Translate "MVP": https://github.com/googlecodelabs/cloud-nebulous-serverless-python .. _Google Cloud serverless hosting platforms: https://cloud.google.com/serverless#serverless-products .. _App Engine: https://cloud.google.com/appengine .. _Cloud Functions: https://cloud.google.com/functions From 6c71edf8f87f281645ddc36edbee29edf724f8dc Mon Sep 17 00:00:00 2001 From: Dan Lee <71398022+dandhlee@users.noreply.github.com> Date: Thu, 27 May 2021 21:01:36 -0400 Subject: [PATCH 8/9] chore: update RST for Sphinx lint --- README.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.rst b/README.rst index 0fc13703..890aec12 100644 --- a/README.rst +++ b/README.rst @@ -87,7 +87,7 @@ Windows Samples ----------- -The `samples`_ folder contains all of the Cloud Translation API code snippets +The `samples`__ folder contains all of the Cloud Translation API code snippets found in `its documentation`_ as well as complete sample apps: - `Mini Google Translate "MVP"`_ app From 0b370f6248772e9dad4c1284ff519a67e97e7102 Mon Sep 17 00:00:00 2001 From: Dan Lee <71398022+dandhlee@users.noreply.github.com> Date: Thu, 27 May 2021 21:13:40 -0400 Subject: [PATCH 9/9] chore: update README for RST style --- README.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.rst b/README.rst index 890aec12..1895a62f 100644 --- a/README.rst +++ b/README.rst @@ -87,7 +87,7 @@ Windows Samples ----------- -The `samples`__ folder contains all of the Cloud Translation API code snippets +The `samples folder`_ contains all of the Cloud Translation API code snippets found in `its documentation`_ as well as complete sample apps: - `Mini Google Translate "MVP"`_ app @@ -96,7 +96,7 @@ found in `its documentation`_ as well as complete sample apps: - Deployable locally or any on-prem or cloud host supporting Flask apps - Also deployable to `Google Cloud serverless hosting platforms`_ (`App Engine`_, `Cloud Functions`_, or `Cloud Run`_) with only minor configuration changes -.. _samples: samples +.. _samples folder: samples .. _its documentation: https://cloud.google.com/translate/docs .. _Mini Google Translate "MVP": https://github.com/googlecodelabs/cloud-nebulous-serverless-python .. _Google Cloud serverless hosting platforms: https://cloud.google.com/serverless#serverless-products