Update Mon Jan 7 11:08:12 CST 2013: I’ve taken down the Github repo and the plot demo – I like some of the plotting functionality in there but as a whole package I wasn’t really happy with how it was turning out. If you’d like a copy of the code anyway, let me know.
I don’t get the chance to do much in the way of web apps at work, so I thought this holiday I’d work a little on that in my time off. I had an idea a while ago for a server-side application that would generate data plots on the fly, and after working out the basic mechanics of it at the time I went back to it this past weekend and started converting it into a Flask app. I’ve played with Django once or twice in my spare time but it’s never felt like a good fit for the kind of application I had in mind at the time. Flask really appeals to me as something that offers a fair amount of functionality but mostly stays out of your way; Django strikes me as more appropriate if you’re looking at putting together an admin-based site.
I’ve got a demo version up for the time being @PythonAnywhere, read on for details.
plot is fairly crude but it does allow uploading CSV data and producing plots on the server. Based on the shape of the data it’ll take a guess as to the correct type of plot to return, or you can just tell it which type to use. If you don’t happen to have any comma-delimited data available, have a look at the samples – the XY and Image plots are reading sample data files from the server and generating plots while you wait. Instead of just reading a static data file, the Random Data plot generates a two-dimensional array of data on the fly and then produces the plot for your amusement.
I’d also like to add some ability to make guesses about the format of data you upload – I’ve got some scratch code that does something of that nature that I’ll add later. Also planned – more types of plot, more control over the output, and so on. Finally, I’d like to put it together as a full-blown REST API.
So far the chance to work on web applications has been very rewarding. For one thing, wxPython seems to require a lot more wrestling to get it into shape, and documentation for Bootstrap, Flask, etc. is excellent.