Created
April 11, 2012 12:54
-
-
Save pigeonflight/2359134 to your computer and use it in GitHub Desktop.
gdata api example
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" 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