3 ms·
My base web development stack today is Python2.7+Flask+Fabric. I'm loving it. I've been using a lot of Fabric to do adhoc testing, write little tasks to do litt
by jgalvez 16y ago
My base web development stack today is Python2.7+Flask+Fabric. I'm loving it. I've been using a lot of Fabric to do adhoc testing, write little tasks to do little specialized things, debug using code.interact() sometimes. It's the best thing ever. Flask is also the best thing that happened to the Python web development community recently. The documentation is truly awesome and library is extremely minimalist. There are many things Flask refuses to do in order to keep simplicity. But there are plenty of recipes in the site that teach you how to integrate specialized solutions for your apps. I really like loosely coupled systems and the Python culture is aligned with it.
I've pretty much stopped using package managers tho. Sometimes I may use pip to install some library, but most of the time, I try to keep everything (full packages) cached in a "lib" subdirectory and install on-demand. Even for Flask extensions, I try to to manually copy the libraries to lib/flaskext instead of letting pip handle it for me. The benefits of this is that you're never dependent on ANY package manager to run your app, and you keep all your dependencies frozen in your project's repository. (PS.: I f_cking hate git submodules).
The other thing I've been doing is using a more Unix-y configuration style (https://gist.github.com/aa9158d559c642fed619 https://gist.github.com/aa9158d559c642fed619). My Python web applications today consist of an app.py file, an app.conf file, a support.py file (which loads all dependencies isolatedly and then I just do "from support import *" in app.py), a lib/ directory with dependencies and fabfile.py. In fabfile.py, I usually have a "web" task to start the development server and many other small tasks I add as I go. It can't get any simpler than that.