Skip to content

Instantly share code, notes, and snippets.

@imsickofmaps
Last active April 28, 2017 05:31
Show Gist options
  • Save imsickofmaps/d18196ef8fc47469a367e23993b4b8cf to your computer and use it in GitHub Desktop.
Save imsickofmaps/d18196ef8fc47469a367e23993b4b8cf to your computer and use it in GitHub Desktop.
# 1. Post CSV to a secret gist
# 2. Grab the link to the raw version
# 3. Run the following on the server
import csv
import io
import requests
url = "http://gist" # replace
file = io.StringIO(requests.get(url).text)
records = list(csv.DictReader(file))
for record in records:
print(record) # should be a dictionary
# 4. Clean up the secret gist
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment