Need help with python-docs-samples?
Click the “chat” button below for chat support from the developer who created it, or find similar developers for support.

About the developer

5.3K Stars 5.4K Forks Apache License 2.0 4.9K Commits 57 Opened issues


Code samples used on

Services available


Need anything else?

Contributors list

Google Cloud Platform Python Samples

Python samples for Google Cloud Platform products.

Build Status Build Status Build Status Build Status


  1. Install

    if you do not already have them.

  2. Clone this repository:

    git clone
  3. Obtain authentication credentials.

    Create local credentials by running the following command and following the oauth2 flow (read more about the command here):

    gcloud auth application-default login

    Read more about Google Cloud Platform Authentication.

How to run a sample

  1. Change directory to one of the sample folders, e.g.

    cd logging/cloud-client/
  2. Create a virtualenv. Samples are compatible with Python 3.6+.

    python3 -m venv env
    source env/bin/activate
  3. Install the dependencies needed to run the samples.

    pip install -r requirements.txt
  4. Run the sample:



Contributions welcome! See the Contributing Guide.

We use cookies. If you continue to browse the site, you agree to the use of cookies. For more information on our use of cookies please see our Privacy Policy.