Skip to content

Instantly share code, notes, and snippets.

@pigeonflight
Created April 11, 2012 12:54
Show Gist options
  • Save pigeonflight/2359134 to your computer and use it in GitHub Desktop.
Save pigeonflight/2359134 to your computer and use it in GitHub Desktop.
gdata api example
""" This script allows you to interactively create a new database """
import gdata.spreadsheet.text_db
import getpass
import os
# os.putenv('http_proxy','scalpel:8080')
# os.putenv('https_proxy','scalpel:8080')
# Create a client class which will make HTTP requests with
# Google Spreadsheet Service
# Authenticate using your Google Docs email address and password.
email = raw_input('email address: ')
password = getpass.getpass()
print ("got the password,attempting to connect")
client = gdata.spreadsheet.text_db.DatabaseClient(email,password)
# Create a new spreadsheet/db
newdb = raw_input('name of new spreadsheet/db :')
db = client.CreateDatabase(newdb)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment