Remote server: running a Python script and making *.csv files publicly available

Michael Torrie torriem at gmail.com
Wed Dec 5 18:20:49 EST 2012


On 12/05/2012 12:14 PM, Jason Hsu wrote:
> I have a Python 2.7 script that produces *.csv files.  I'd like to
> run this Python script on a remote server and make the *.csv files
> publicly available to read.
> 
> Can this be done on Heroku?  I've gone through the tutorial, but it
> seems to be geared towards people who want to create a whole web
> site.
> 
> If Heroku isn't the solution for me, what are the alternatives?  I
> tried Google App Engine, but it requires Python 2.5 and won't work
> with 2.7.

Can you just write the files in a directory and then have apache
configured to serve this directory up over http? That way Python needn't
worry about the details of http serving.  Other mini web servers would
work too like lighttpd or uhttpd.

Alternatively you could use Python-Twisted to implement a simple web
server that serves up the CSV.

Using a full framework is overkill, in my opinion.  I'm not sure what
Heroku (first I've heard of it) is, but I don't think you need that.



More information about the Python-list mailing list