Ask HN: What Python web programming frameworks and tools are you using?
This was last asked about half a year ago (http://news.ycombinator.com/item?id=1357925) and 2 years before that (http://news.ycombinator.com/item?id=153487), but things are changing fast, especially with the recent popularity of NoSQL, so I think it's worth bringing up again.
So, what tools, databases, web servers and frameworks are you using for your latest Python web application projects? Or, if you've abandoned Python, what language have you moved to, and why?
[+] [-] luffy|15 years ago|reply
database: Postgresql
server: UWSGI + Cherokee
Flask is a very nice framework, and the documentation is awesome. I've tried a lot of Python frameworks out before deciding on Flask. It's a paralyzing decision - there is just so much out there. The process of choosing a web framework is filled with information overload - from reading about the framework, dabbling with the code, and finally learning the actual framework. For the reason, I recommend going with a microframework. You learn what you need as you go. So this lead me to Flask.
Two things set Flask apart (for me) - the documentation and the extensions. Just check out the site http://flask.pocoo.org for more information. You also want to be assured that development on the framework is not just going to be dropped some day. It really feels like this framework is going places. (My initial inclination was toward CherryPy, but the documentation is bad. After all these years.)
My dev work is mostly done on Windows, and for an IDE I've taken to using JetBrain's PyCharm. (I'm primarily a .NET developer, and I find it more convenient to use Windows to avoid context switching. The fact that I deal with the massive and all-encompassing .NET is also a major reason I went with a Python microframework). On Linux, I can get by with Emacs.
Using Ubuntu in production environment.
[+] [-] dawsdesign|15 years ago|reply
[+] [-] code_duck|15 years ago|reply
[+] [-] code_duck|15 years ago|reply
I'm quite satisfied with Python. I can't see any reason to move to another language for general web development, but while Python is quite current and modern, it isn't esoteric, geeky or on the cutting edge. So, I'm dabbling with Clojure and Scala, specifically Scalatra and Compojure.
[+] [-] regularfry|15 years ago|reply
I'm using web.py, testing with nose, doing database work with sqlalchemy to a postgres back-end. Looking at Paste and wondering if I should be using that as well, but currently a simple apache2 mod_wsgi container is doing ok.
I deploy to Debian stable but develop on Ubuntu Lucid, which means that in order to keep myself sane I've built Python 2.6 and virtualenv packages for debian, and install all the packages I need with pip. I'm still getting my head around this, because I've not used these tools at all before.
Deployment is done by pushing to a remote git master branch, where the remote live branch is what's checked out and running.
Styling is all blueprint.css, and I'm contemplating whether to use my usual Compass workflow or not. So far it's not been needed, but I haven't pushed things very far yet.
I'm not in the sort of space where NoSQL would be an advantage, so I can't comment on it.
[+] [-] macco|15 years ago|reply
But you can use whatever you want.
[+] [-] rdw20101009|15 years ago|reply
I am a web application security engineer (among other things), so I screened and was forced to reject all frameworks because they don't adequately address security (not even webpy), and because they are too heavy.
Instead, I am building a very lightweight, simple, but integrated web content generation layer directly in Python using built-in string formatting. I construct a page using a trivial DOM-like object model that renders to a string web response (HTML, CSS, JS). I push Model data into the DOM-like View under the direction of a page Controller (MVC pattern). However, my View contains the logic to properly encode output contextually to avoid common security vulnerabilities in the web response. Likewise, I have exhaustive input validation to deal with the data in the web request.
[+] [-] Luyt|15 years ago|reply
[+] [-] madhouse|15 years ago|reply
Web Stuff: jQuery, less.js
Database: PostgreSQL
Tools: Emacs
[+] [-] andymoe|15 years ago|reply
- Google App Engine
- http://www.tipfy.org (GAE specific framework)
[+] [-] vosper|15 years ago|reply
[+] [-] hanula|15 years ago|reply
Tools: * Virtualenv * Fabric
Best combination. Zope, Django, Web2py, web.py are just not that flexible & reliable for advanced web applications (IMHO).
[+] [-] mdipierro|15 years ago|reply
[+] [-] endlessvoid94|15 years ago|reply
Disclaimer: We're about to launch Djangy.com, so my opinion is obviously biased.
[+] [-] sushi|15 years ago|reply
Other than that I'd like if you could also give a sense of expenses that I might run into if I deploy my app on djangy. The details in terms of pricing are lacking there.
Just some feedback. I know it's in private beta. All the best.
[+] [-] Tycho|15 years ago|reply
[+] [-] vosper|15 years ago|reply
query = myModel.all().filter("property_1 =", value)
query = query.filter("property_2 =", value)
Here's a gotcha... be sure to have a space between "property_1" and "=", "property_1=" won't work (but it won't raise an error either).
Be aware that the Datastore has very limited support for querying in general, and you will certainly not have anywhere near the kind of power you are used to when composing queries in .Net with something like LINQ.
GAE is a good start if you want to learn Python, but it is a terrible platform for web development. You will find yourself stymied and frustrated by its inflexibility, the need to give up your normalized data model from Day 1, lack of referential integrity, and the awful performance compared to a real SQL database.
Oh, and the constant outages, the scheduled maintenance that borks the whole system for a week, the backup tool that takes 4 hours to run and then crashes trying to restore the backups... I have a long list :)
[+] [-] endtime|15 years ago|reply
Django templates look a lot like HTML, but with special Django stuff in them. You can get the general idea from this page: http://docs.djangoproject.com/en/dev/ref/templates/builtins/
And yes, you write in JS pretty much the same stuff that you'd always write in JS.
[+] [-] mdipierro|15 years ago|reply
[+] [-] _b8r0|15 years ago|reply
[+] [-] dochtman|15 years ago|reply
[+] [-] sgt|15 years ago|reply
[+] [-] tamentis|15 years ago|reply
[+] [-] sry_not4sale|15 years ago|reply
Deadly simple, but still everything you need :)
http://bottle.paws.de/docs/dev/index.html
[+] [-] abiczo|15 years ago|reply
I'll probably try Flask for my next project.
[+] [-] rbanffy|15 years ago|reply
[+] [-] dayski|15 years ago|reply
[+] [-] Maascamp|15 years ago|reply
[+] [-] thedangler|15 years ago|reply