Skip to main content
100%

Gist f43601b1f490d87ec6f8

✓ Published0🌍 Public
Aandybak
Last edited Jan 25, 2012
Created on Sep 15, 2014

This example shows a Python script that downloads a Google Spreadsheet as a CSV file and prints its rows. The code defines a `Spreadsheet` class and a `Client` class that handles authentication via Google’s ClientLogin API, using `urllib` and `urllib2` for HTTP requests and `re` for parsing the authentication token. It then fetches the spreadsheet’s contents through the Google Sheets export feed, specifying the format as CSV and a worksheet ID, and parses the result with the standard `csv` module. The script demonstrates a straightforward command-line workflow for accessing spreadsheet data programmatically.

AI-generated description

Similar vizzes