Skip to content

GoogleCloudPlatform/python-docs-samples

Folders and files

NameName
Last commit message
Last commit date
Apr 10, 2025
Jan 22, 2025
Apr 2, 2025
Feb 6, 2025
Apr 4, 2025
Jan 23, 2025
Feb 8, 2025
Jan 16, 2025
Jan 6, 2025
Feb 3, 2025
Feb 16, 2025
Apr 2, 2025
Feb 3, 2025
Mar 19, 2025
Nov 23, 2021
Jan 7, 2025
Mar 26, 2025
Oct 18, 2024
Jan 29, 2025
Apr 4, 2025
Jan 29, 2025
Feb 6, 2025
Feb 6, 2025
Feb 16, 2025
Apr 1, 2025
Feb 16, 2025
Dec 13, 2024
Feb 16, 2025
Jan 16, 2025
Feb 19, 2025
Mar 31, 2025
Jan 20, 2025
Jan 6, 2025
Mar 14, 2025
Mar 26, 2025
Apr 11, 2025
Apr 11, 2025
Apr 8, 2025
Mar 26, 2025
Mar 31, 2025
Apr 11, 2025
Jan 6, 2025
Dec 19, 2024
Jan 29, 2025
Dec 9, 2024
Apr 8, 2025
Apr 1, 2025
Apr 10, 2025
Apr 8, 2025
Feb 16, 2025
Feb 7, 2025
Apr 4, 2025
Aug 14, 2023
Feb 6, 2025
Apr 1, 2025
Apr 2, 2025
Mar 26, 2025
Mar 27, 2025
Apr 1, 2025
Apr 2, 2025
Jan 25, 2022
Apr 1, 2025
Jan 29, 2025
Apr 10, 2025
Mar 26, 2025
Apr 2, 2025
Dec 11, 2024
Dec 9, 2024
Mar 29, 2025
Apr 2, 2025
Jun 7, 2024
Apr 1, 2025
Jan 29, 2025
Jan 16, 2025
Apr 2, 2025
Mar 25, 2025
Feb 3, 2025
Apr 9, 2025
Jan 22, 2025
Apr 1, 2025
Apr 2, 2025
Jan 16, 2025
Jan 23, 2025
Sep 23, 2021
Jan 23, 2025
Feb 7, 2025
Jan 23, 2025
Feb 16, 2025
Nov 23, 2021
Jan 23, 2025
Nov 20, 2024
Mar 25, 2025
Mar 22, 2025
Jan 29, 2025
Apr 8, 2025
Jan 23, 2025
Mar 18, 2025
Apr 4, 2025
Jan 23, 2025
Jan 23, 2025
Apr 4, 2025
Feb 2, 2022
Jun 13, 2023
Feb 10, 2023
May 29, 2020
Jan 23, 2025
Jul 21, 2021
Apr 13, 2023
Feb 26, 2015
Feb 27, 2023
Jun 13, 2024
Jan 23, 2025
Jul 21, 2021
Dec 11, 2013
Jan 23, 2025
Jan 23, 2025
Jun 27, 2023
Apr 2, 2020
Oct 29, 2024

Google Cloud Platform Python Samples

Python samples for Google Cloud Platform products.

Build Status Build Status Build Status Build Status Build Status Build Status

Google Cloud Samples

Check out some of the samples found on this repository on the Google Cloud Samples page.

Setup

  1. Install pip and virtualenv if you do not already have them.

  2. Clone this repository:

    git clone https://github.com/GoogleCloudPlatform/python-docs-samples.git
    
  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. logging/cloud-client:

    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:

    python snippets.py
    

Contributing

Contributions welcome! See the Contributing Guide.