- Notifications
You must be signed in to change notification settings - Fork6.6k
Code samples used on cloud.google.com
License
GoogleCloudPlatform/python-docs-samples
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
Python samples forGoogle Cloud Platform products.
Check out some of the samples found on this repository on theGoogle Cloud Samples page.
Install
pip
andvirtualenv
if you do not already have them.Clone this repository:
git clone https://github.com/GoogleCloudPlatform/python-docs-samples.git
Obtain authentication credentials.
Create local credentials by running the following command and following theoauth2 flow (read more about the commandhere):
gcloud auth application-default login
Read more aboutGoogle Cloud Platform Authentication.
Change directory to one of the sample folders, e.g.
logging/cloud-client
:cd logging/cloud-client/
Create a virtualenv. Samples are compatible with Python 3.6+.
python3 -m venv envsource env/bin/activate
Install the dependencies needed to run the samples.
pip install -r requirements.txt
Run the sample:
python snippets.py
Contributions welcome! See theContributing Guide.
About
Code samples used on cloud.google.com
Topics
Resources
License
Code of conduct
Security policy
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Releases
Packages0
Uh oh!
There was an error while loading.Please reload this page.