Google APIs Client Library for Python

Sample Applications

This page lists sources and information for sample scripts that demonstrate use of this library.

Before diving into these samples, you should see the Getting Started page. It has basic examples covering API keys, OAuth 2.0, web applications, and installed applications. These scripts are thoroughly commented to explain every step.

The Google APIs Client Library for Python is an open source project on Google Project Hosting. The library source code and many sample applications can be found there. Follow the instructions on the Installation page to install these samples. The samples cover various application types, library features, platforms, and specific APIs.

See the following page for a description of all available samples:
     Sample Applications page

Running samples

Many of the samples use a client_secrets.json file described in the flow_from_secrets() section of the OAuth 2.0 page. Before running a sample script, you need to update this file.

When running a command-line or Google App Engine script locally:

  1. Get a client ID and secret for installed applications on the API Access pane and choose the Other installed application type.
  2. Update the client_id and client_secret parameters in your client_secrets.json file with the client ID and secret for installed applications

When running a script as a web application or deployed Google App Engine script:

  1. Get a client ID and secret for web applications on the API Access pane
  2. Update the client_id and client_secret parameters in your client_secrets.json file with the client ID and secret for web applications

Authentication required

You need to be signed in with Google+ to do that.

Signing you in...

Google Developers needs your permission to do that.