FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [View Raw Code]   [Original HTTPS Page]

python-docs-samples/README.md at dataproc_tutorial · DataSolveProblems/python-docs-samples · GitHub

Latest commit

 

History

History
73 lines (50 loc) · 2.57 KB

File metadata and controls

73 lines (50 loc) · 2.57 KB

Google Cloud Platform Python Samples

Python samples for Google Cloud Platform products.

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.


Back | FazBrowse Home | New Git URL