Skip to content

Instantly share code, notes, and snippets.

@alasarr
Last active December 5, 2017 08:37
Show Gist options
  • Save alasarr/8bf882d31bab6ba8b942f4cb0b6fea2c to your computer and use it in GitHub Desktop.
Save alasarr/8bf882d31bab6ba8b942f4cb0b6fea2c to your computer and use it in GitHub Desktop.
CARTO Batch API sample
from longitude.models.cartomodel import CartoModel
from longitude.config import cfg
cfg['CARTO_USER'] = 'XXX'
cfg['CARTO_API_KEY'] = 'XXXX'
cm = CartoModel()
q = '''
select pg_sleep(10)
'''
cm.query(q, {'batch': True})
@alasarr
Copy link
Author

alasarr commented Dec 5, 2017

It requires to install geographica-longitude.

pip install geographica-longitude

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment