-
-
Save oeon/57b8d8d0859336424ff7235dc0772020 to your computer and use it in GitHub Desktop.
Python script for fetching a Fulcrum data share and saving it locally with a date & time stamp.
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
import urllib2 | |
import datetime | |
def timeStamped(fname, fmt='%Y-%m-%d-%H-%M-%S_{fname}'): | |
return datetime.datetime.now().strftime(fmt).format(fname=fname) | |
url = 'https://web.fulcrumapp.com/shares/6e158acd08cacfad.csv' | |
u = urllib2.urlopen(url) | |
localFile = open('fulcrum_data.csv', 'w') | |
localFile.write(u.read()) | |
localFile.close() | |
with open(timeStamped('fulcrum_data.csv'),'w') as outf: | |
outf.write('data!') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment