A simple CartoDB client to perform requests against the CartoDB API. Internally it uses OAuth
pip install -e git+git://github.com/javisantana/cartodb-python.git#egg=cartdob
user = '[email protected]'
password = 'XXXX'
CONSUMER_KEY='XXXXXXXXXXXXXXXXXX'
CONSUMER_SECRET='YYYYYYYYYYYYYYYYYYYYYYYYYY'
cartodb_domain = 'vitorino'
cl = CartoDB(CONSUMER_KEY, CONSUMER_SECRET, user, password, cartodb_domain)
try:
print cl.sql('select * from mytable')
except CartoDBException as e:
print ("some error ocurred", e)