Created
September 3, 2015 11:11
-
-
Save iriberri/8d08048639bdefe6bc81 to your computer and use it in GitHub Desktop.
Python script for uploading file to CartoDB
This file contains hidden or 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
import requests | |
url='https://username.cartodb.com/api/v1/imports/?api_key=api_key' | |
files = {'file': ('report.zip', open('/Users/Iriberri/Downloads/report.zip', 'rb'), 'application/zip')} | |
r = requests.post(url, files=files) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment