This repository was archived by the owner on Dec 31, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 29
docs: add samples from kms/api-client #14
Merged
busunkim96
merged 55 commits into
googleapis:master
from
busunkim96:add-snippets-samples
Jun 4, 2020
Merged
Changes from 1 commit
Commits
Show all changes
55 commits
Select commit
Hold shift + click to select a range
3fcf98f
Python KMS Apiary P1 samples [(#779)](https://github.com/GoogleCloudP…
ryanmats 1f3c3b9
random generation of keyring / cryptokey names [(#786)](https://githu…
ryanmats d3c9a9b
Auto-update dependencies. [(#790)](https://github.com/GoogleCloudPlat…
dpebot 2f0e389
Remove usage of GoogleCredentials [(#810)](https://github.com/GoogleC…
27611b3
Updates Could-KMS sample code to use V1 libraries. [(#856)](https://g…
philcoakley 57dbdb1
Remove cloud config fixture [(#887)](https://github.com/GoogleCloudPl…
fa6ee74
Re-generate all readmes
966d0d9
KMS: Clean up base64 logic in the encrypt and decrypt functions. [(#1…
77e5c1a
KMS: Make the samples consistent with the other languages. [(#1075)](…
aa49dbc
Auto-update dependencies. [(#1094)](https://github.com/GoogleCloudPla…
dpebot 04e00af
Update all generated readme auth instructions [(#1121)](https://githu…
5156f09
Auto-update dependencies. [(#1133)](https://github.com/GoogleCloudPla…
dpebot f894679
Added Link to Python Setup Guide [(#1158)](https://github.com/GoogleC…
98fa815
Auto-update dependencies. [(#1186)](https://github.com/GoogleCloudPla…
dpebot 091dbc6
Adds snippets for enabling and restoring a key version [(#1196)](http…
WalterHub ff973d8
Auto-update dependencies. [(#1217)](https://github.com/GoogleCloudPla…
dpebot b9a4c34
Added "Open in Cloud Shell" buttons to README files [(#1254)](https:/…
251d796
Auto-update dependencies. [(#1309)](https://github.com/GoogleCloudPla…
dpebot 091bcac
Auto-update dependencies. [(#1320)](https://github.com/GoogleCloudPla…
dpebot c4f16b4
Auto-update dependencies. [(#1355)](https://github.com/GoogleCloudPla…
dpebot 4f3ccbf
Auto-update dependencies. [(#1359)](https://github.com/GoogleCloudPla…
dpebot 7264e6a
Auto-update dependencies.
dpebot d140516
Regenerate the README files and fix the Open in Cloud Shell link for …
2857b8d
Update READMEs to fix numbering and add git clone [(#1464)](https://g…
frankyn cf6aa1a
Resolved conflicts.
michaelawyu 6e26023
Merge branch 'dpebot-repositorygardener' despite flaky dataproc tests
michaelawyu e2c0637
added kms asymmetric samples [(#1638)](https://github.com/GoogleCloud…
daniel-sanche 45107a0
kms text fixes [(#1647)](https://github.com/GoogleCloudPlatform/pytho…
daniel-sanche 8cbac2e
KMS test fix [(#1690)](https://github.com/GoogleCloudPlatform/python-…
daniel-sanche c6ac726
KMS changes [(#1723)](https://github.com/GoogleCloudPlatform/python-d…
daniel-sanche 2b8e5e1
KMS import comments [(#1771)](https://github.com/GoogleCloudPlatform/…
daniel-sanche 9a7aa6c
Auto-update dependencies. [(#1846)](https://github.com/GoogleCloudPla…
dpebot 0f27818
Auto-update dependencies. [(#1862)](https://github.com/GoogleCloudPla…
dpebot 15d486d
KMS: Updated for new client library [(#1903)](https://github.com/Goog…
daniel-sanche 7b25fbc
Auto-update dependencies. [(#1980)](https://github.com/GoogleCloudPla…
dpebot fe32c0c
Move import statements into tagged regions [(#2219)](https://github.c…
engelke dc0df22
Adds split updates for Firebase ... opencensus [(#2438)](https://gith…
gguuss 18100cc
Auto-update dependencies. [(#2005)](https://github.com/GoogleCloudPla…
dpebot 17f78cf
chore(deps): update dependency google-cloud-kms to v1.3.0 [(#3160)](h…
renovate-bot a4df66a
Simplify noxfile setup. [(#2806)](https://github.com/GoogleCloudPlatf…
kurtisvg e1fe4da
[kms] fix flaky test [(#3268)](https://github.com/GoogleCloudPlatform…
daniel-sanche b376b7b
Update dependency google-cloud-kms to v1.4.0 [(#3410)](https://github…
renovate-bot 5581e83
chore(deps): update dependency cryptography to v2.9 [(#3266)](https:/…
renovate-bot b33aa1c
fix: use `crypto_key_path` instead of `crypto_key_path_path` [(#3319)…
busunkim96 1e095c3
chore(deps): update dependency cryptography to v2.9.1 [(#3463)](https…
renovate-bot aa5277b
[kms] chore: remove gcp-devrel-py-tools [(#3479)](https://github.com/…
6283510
Update dependency cryptography to v2.9.2 [(#3473)](https://github.com…
renovate-bot 2f018a3
[kms] fix: use unique ids for test [(#3563)](https://github.com/Googl…
97d80d5
Update and add Cloud KMS samples [(#3690)](https://github.com/GoogleC…
sethvargo 1b1d5da
chore: some lint fixes [(#3748)](https://github.com/GoogleCloudPlatfo…
309319a
Merge branch 'snippets-samples' into add-snippets-samples
busunkim96 2bc9430
chore: update templates
busunkim96 515d022
chore: update templates
busunkim96 990e7a6
chore: update docs index
busunkim96 7b36aeb
chore: only trigger review for python file changes
busunkim96 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
chore: update templates
- Loading branch information
commit 515d022e6291f1077f923b3349ce286e4e89dd56
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| # Code owners file. | ||
| # This file controls who is tagged for review for any given pull request. | ||
| # | ||
| # For syntax help see: | ||
| # https://help.github.com/en/github/creating-cloning-and-archiving-repositories/about-code-owners#codeowners-syntax | ||
|
|
||
|
|
||
| /samples/ @DanSanche @googleapis/python-samples-owners | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,34 @@ | ||
| # Format: //devtools/kokoro/config/proto/build.proto | ||
|
|
||
| # Build logs will be here | ||
| action { | ||
| define_artifacts { | ||
| regex: "**/*sponge_log.xml" | ||
| } | ||
| } | ||
|
|
||
| # Specify which tests to run | ||
| env_vars: { | ||
| key: "RUN_TESTS_SESSION" | ||
| value: "lint" | ||
| } | ||
|
|
||
| env_vars: { | ||
| key: "TRAMPOLINE_BUILD_FILE" | ||
| value: "github/python-kms/.kokoro/test-samples.sh" | ||
| } | ||
|
|
||
| # Configure the docker image for kokoro-trampoline. | ||
| env_vars: { | ||
| key: "TRAMPOLINE_IMAGE" | ||
| value: "gcr.io/cloud-devrel-kokoro-resources/python-samples-testing-docker" | ||
| } | ||
|
|
||
| # Download secrets for samples | ||
| gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/python-docs-samples" | ||
|
|
||
| # Download trampoline resources. | ||
| gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/trampoline" | ||
|
|
||
| # Use the trampoline script to run in docker. | ||
| build_file: "python-kms/.kokoro/trampoline.sh" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| # Format: //devtools/kokoro/config/proto/build.proto | ||
|
|
||
| env_vars: { | ||
| key: "INSTALL_LIBRARY_FROM_SOURCE" | ||
| value: "True" | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| # Format: //devtools/kokoro/config/proto/build.proto | ||
|
|
||
| env_vars: { | ||
| key: "INSTALL_LIBRARY_FROM_SOURCE" | ||
| value: "False" | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| # Format: //devtools/kokoro/config/proto/build.proto | ||
|
|
||
| env_vars: { | ||
| key: "INSTALL_LIBRARY_FROM_SOURCE" | ||
| value: "True" | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,34 @@ | ||
| # Format: //devtools/kokoro/config/proto/build.proto | ||
|
|
||
| # Build logs will be here | ||
| action { | ||
| define_artifacts { | ||
| regex: "**/*sponge_log.xml" | ||
| } | ||
| } | ||
|
|
||
| # Specify which tests to run | ||
| env_vars: { | ||
| key: "RUN_TESTS_SESSION" | ||
| value: "py-3.6" | ||
| } | ||
|
|
||
| env_vars: { | ||
| key: "TRAMPOLINE_BUILD_FILE" | ||
| value: "github/python-kms/.kokoro/test-samples.sh" | ||
| } | ||
|
|
||
| # Configure the docker image for kokoro-trampoline. | ||
| env_vars: { | ||
| key: "TRAMPOLINE_IMAGE" | ||
| value: "gcr.io/cloud-devrel-kokoro-resources/python-samples-testing-docker" | ||
| } | ||
|
|
||
| # Download secrets for samples | ||
| gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/python-docs-samples" | ||
|
|
||
| # Download trampoline resources. | ||
| gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/trampoline" | ||
|
|
||
| # Use the trampoline script to run in docker. | ||
| build_file: "python-kms/.kokoro/trampoline.sh" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| # Format: //devtools/kokoro/config/proto/build.proto | ||
|
|
||
| env_vars: { | ||
| key: "INSTALL_LIBRARY_FROM_SOURCE" | ||
| value: "True" | ||
| } | ||
|
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| # Format: //devtools/kokoro/config/proto/build.proto | ||
|
|
||
| env_vars: { | ||
| key: "INSTALL_LIBRARY_FROM_SOURCE" | ||
| value: "False" | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| # Format: //devtools/kokoro/config/proto/build.proto | ||
|
|
||
| env_vars: { | ||
| key: "INSTALL_LIBRARY_FROM_SOURCE" | ||
| value: "True" | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,34 @@ | ||
| # Format: //devtools/kokoro/config/proto/build.proto | ||
|
|
||
| # Build logs will be here | ||
| action { | ||
| define_artifacts { | ||
| regex: "**/*sponge_log.xml" | ||
| } | ||
| } | ||
|
|
||
| # Specify which tests to run | ||
| env_vars: { | ||
| key: "RUN_TESTS_SESSION" | ||
| value: "py-3.7" | ||
| } | ||
|
|
||
| env_vars: { | ||
| key: "TRAMPOLINE_BUILD_FILE" | ||
| value: "github/python-kms/.kokoro/test-samples.sh" | ||
| } | ||
|
|
||
| # Configure the docker image for kokoro-trampoline. | ||
| env_vars: { | ||
| key: "TRAMPOLINE_IMAGE" | ||
| value: "gcr.io/cloud-devrel-kokoro-resources/python-samples-testing-docker" | ||
| } | ||
|
|
||
| # Download secrets for samples | ||
| gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/python-docs-samples" | ||
|
|
||
| # Download trampoline resources. | ||
| gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/trampoline" | ||
|
|
||
| # Use the trampoline script to run in docker. | ||
| build_file: "python-kms/.kokoro/trampoline.sh" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| # Format: //devtools/kokoro/config/proto/build.proto | ||
|
|
||
| env_vars: { | ||
| key: "INSTALL_LIBRARY_FROM_SOURCE" | ||
| value: "True" | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| # Format: //devtools/kokoro/config/proto/build.proto | ||
|
|
||
| env_vars: { | ||
| key: "INSTALL_LIBRARY_FROM_SOURCE" | ||
| value: "False" | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| # Format: //devtools/kokoro/config/proto/build.proto | ||
|
|
||
| env_vars: { | ||
| key: "INSTALL_LIBRARY_FROM_SOURCE" | ||
| value: "True" | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,34 @@ | ||
| # Format: //devtools/kokoro/config/proto/build.proto | ||
|
|
||
| # Build logs will be here | ||
| action { | ||
| define_artifacts { | ||
| regex: "**/*sponge_log.xml" | ||
| } | ||
| } | ||
|
|
||
| # Specify which tests to run | ||
| env_vars: { | ||
| key: "RUN_TESTS_SESSION" | ||
| value: "py-3.8" | ||
| } | ||
|
|
||
| env_vars: { | ||
| key: "TRAMPOLINE_BUILD_FILE" | ||
| value: "github/python-kms/.kokoro/test-samples.sh" | ||
| } | ||
|
|
||
| # Configure the docker image for kokoro-trampoline. | ||
| env_vars: { | ||
| key: "TRAMPOLINE_IMAGE" | ||
| value: "gcr.io/cloud-devrel-kokoro-resources/python-samples-testing-docker" | ||
| } | ||
|
|
||
| # Download secrets for samples | ||
| gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/python-docs-samples" | ||
|
|
||
| # Download trampoline resources. | ||
| gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/trampoline" | ||
|
|
||
| # Use the trampoline script to run in docker. | ||
| build_file: "python-kms/.kokoro/trampoline.sh" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| # Format: //devtools/kokoro/config/proto/build.proto | ||
|
|
||
| env_vars: { | ||
| key: "INSTALL_LIBRARY_FROM_SOURCE" | ||
| value: "True" | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| # Format: //devtools/kokoro/config/proto/build.proto | ||
|
|
||
| env_vars: { | ||
| key: "INSTALL_LIBRARY_FROM_SOURCE" | ||
| value: "False" | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| # Format: //devtools/kokoro/config/proto/build.proto | ||
|
|
||
| env_vars: { | ||
| key: "INSTALL_LIBRARY_FROM_SOURCE" | ||
| value: "True" | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,104 @@ | ||
| #!/bin/bash | ||
| # Copyright 2020 Google LLC | ||
| # | ||
| # Licensed under the Apache License, Version 2.0 (the "License"); | ||
| # you may not use this file except in compliance with the License. | ||
| # You may obtain a copy of the License at | ||
| # | ||
| # https://www.apache.org/licenses/LICENSE-2.0 | ||
| # | ||
| # Unless required by applicable law or agreed to in writing, software | ||
| # distributed under the License is distributed on an "AS IS" BASIS, | ||
| # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| # See the License for the specific language governing permissions and | ||
| # limitations under the License. | ||
|
|
||
|
|
||
| # `-e` enables the script to automatically fail when a command fails | ||
| # `-o pipefail` sets the exit code to the rightmost comment to exit with a non-zero | ||
| set -eo pipefail | ||
| # Enables `**` to include files nested inside sub-folders | ||
| shopt -s globstar | ||
|
|
||
| cd github/python-kms | ||
|
|
||
| # Run periodic samples tests at latest release | ||
| if [[ $KOKORO_BUILD_ARTIFACTS_SUBDIR = *"periodic"* ]]; then | ||
| LATEST_RELEASE=$(git describe --abbrev=0 --tags) | ||
| git checkout $LATEST_RELEASE | ||
| fi | ||
|
|
||
| # Disable buffering, so that the logs stream through. | ||
| export PYTHONUNBUFFERED=1 | ||
|
|
||
| # Debug: show build environment | ||
| env | grep KOKORO | ||
|
|
||
| # Install nox | ||
| python3.6 -m pip install --upgrade --quiet nox | ||
|
|
||
| # Use secrets acessor service account to get secrets | ||
| if [[ -f "${KOKORO_GFILE_DIR}/secrets_viewer_service_account.json" ]]; then | ||
| gcloud auth activate-service-account \ | ||
| --key-file="${KOKORO_GFILE_DIR}/secrets_viewer_service_account.json" \ | ||
| --project="cloud-devrel-kokoro-resources" | ||
| fi | ||
|
|
||
| # This script will create 3 files: | ||
| # - testing/test-env.sh | ||
| # - testing/service-account.json | ||
| # - testing/client-secrets.json | ||
| ./scripts/decrypt-secrets.sh | ||
|
|
||
| source ./testing/test-env.sh | ||
| export GOOGLE_APPLICATION_CREDENTIALS=$(pwd)/testing/service-account.json | ||
|
|
||
| # For cloud-run session, we activate the service account for gcloud sdk. | ||
| gcloud auth activate-service-account \ | ||
| --key-file "${GOOGLE_APPLICATION_CREDENTIALS}" | ||
|
|
||
| export GOOGLE_CLIENT_SECRETS=$(pwd)/testing/client-secrets.json | ||
|
|
||
| echo -e "\n******************** TESTING PROJECTS ********************" | ||
|
|
||
| # Switch to 'fail at end' to allow all tests to complete before exiting. | ||
| set +e | ||
| # Use RTN to return a non-zero value if the test fails. | ||
| RTN=0 | ||
| ROOT=$(pwd) | ||
| # Find all requirements.txt in the samples directory (may break on whitespace). | ||
| for file in samples/**/requirements.txt; do | ||
| cd "$ROOT" | ||
| # Navigate to the project folder. | ||
| file=$(dirname "$file") | ||
| cd "$file" | ||
|
|
||
| echo "------------------------------------------------------------" | ||
| echo "- testing $file" | ||
| echo "------------------------------------------------------------" | ||
|
|
||
| # Use nox to execute the tests for the project. | ||
| python3.6 -m nox -s "$RUN_TESTS_SESSION" | ||
| EXIT=$? | ||
|
|
||
| # If this is a periodic build, send the test log to the Build Cop Bot. | ||
| # See https://github.com/googleapis/repo-automation-bots/tree/master/packages/buildcop. | ||
| if [[ $KOKORO_BUILD_ARTIFACTS_SUBDIR = *"periodic"* ]]; then | ||
| chmod +x $KOKORO_GFILE_DIR/linux_amd64/buildcop | ||
| $KOKORO_GFILE_DIR/linux_amd64/buildcop | ||
| fi | ||
|
|
||
| if [[ $EXIT -ne 0 ]]; then | ||
| RTN=1 | ||
| echo -e "\n Testing failed: Nox returned a non-zero exit code. \n" | ||
| else | ||
| echo -e "\n Testing completed.\n" | ||
| fi | ||
|
|
||
| done | ||
| cd "$ROOT" | ||
|
|
||
| # Workaround for Kokoro permissions issue: delete secrets | ||
| rm testing/{test-env.sh,client-secrets.json,service-account.json} | ||
|
|
||
| exit "$RTN" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| .. note:: | ||
|
|
||
| Because this client uses :mod:`grpcio` library, it is safe to | ||
| share instances across threads. In multiprocessing scenarios, the best | ||
| practice is to create client instances *after* the invocation of | ||
| :func:`os.fork` by :class:`multiprocessing.Pool` or | ||
| :class:`multiprocessing.Process`. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| See https://github.com/GoogleCloudPlatform/python-docs-samples/blob/master/AUTHORING_GUIDE.md |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| See https://github.com/GoogleCloudPlatform/python-docs-samples/blob/master/CONTRIBUTING.md |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.