News for hackers. Stuff that matters.
Re:Ask HN: What Web frameworks exist around Python? by coconutrandom on Sunday May 17, 2009 @03:28PM (#613826)
http://webpy.org/

  import web
  
  urls = (
      '/(.*)', 'hello'
  )
  app = web.application(urls, globals())

  class hello:        
      def GET(self, name):
          if not name: 
              name = 'world'
          return 'Hello, ' + name + '!'
  
  if __name__ == "__main__":
      app.run()
Re:Ask HN: What Web frameworks exist around Python? by rabidsnail on Sunday May 17, 2009 @05:26PM (#613962)
It's great for writing small one-offs (the sort of thing you might use PHP for) and web interfaces for non-web applications. But for large projects it's really not suitable.
Re:Ask HN: What Web frameworks exist around Python? by irrelative on Sunday May 17, 2009 @06:36PM (#614021)
I don't know about that. I've written some fairly large programs in webpy lately.

Our latest site, http://sitecanary.com/ has the UI completely written in webpy.

Re:Ask HN: What Web frameworks exist around Python? by marcocampos on Sunday May 17, 2009 @03:53PM (#613863)
Yep, it's pretty cool. But I would say it's more like a library and less like a framework.
Re:Ask HN: What Web frameworks exist around Python? by vthakr on Sunday May 17, 2009 @04:08PM (#613892)
So here (http://fewagainstmany.com/blog/python-micro-frameworks-are-a...) is a post that lists some micro-frameworks for Python, such as web.py. Many of them are similar to Sinatra for Ruby (if you are familiar with that framework) and basically allow you to create very simple web applications in a single file if that is what you desire. While these are not inherently MVC, they can be used as the underlying foundation for your very own MVC framework.

As for MVC, the other big ones for Python (other than Django) are Pylons and TurboGears. Of course there are some other very heavy weight ones as well, such as Zope and Plone, but my knowledge of these is very limited, so I'll leave them for someone else to comment on.

Finally, you can could always use the WSGI spec directly and just slap together all the other "best of bread" pieces to make your own simple framework. It's actually pretty easy to do so, and the best tutorial I've found on doing just that is on Joe Gregorio's website (http://bitworking.org/news/Why_so_many_Python_web_frameworks). Check it out, it's definitely worth running through once to at least get an idea of what other frameworks are doing under the hood.

Re:Ask HN: What Web frameworks exist around Python? by dazzawazza on Sunday May 17, 2009 @06:52PM (#614031)
I'm a big fan of Turbogears. It's big enough to do a lot of work for you but not big enough that it forces your hand.
Re:Ask HN: What Web frameworks exist around Python? by tialys on Sunday May 17, 2009 @03:25PM (#613818)
I'm not really a Python guy (I love my Ruby/Rails...) but I've heard good things about Pylons. http://pylonshq.com/
Re:Ask HN: What Web frameworks exist around Python? by plaes on Sunday May 17, 2009 @04:09PM (#613896)
Werkzeug - the anti-framework. It is more like a library and that's good as it allows you do things the way you like...

http://werkzeug.pocoo.org/

Re:Ask HN: What Web frameworks exist around Python? by mtrichardson on Sunday May 17, 2009 @04:30PM (#613920)
Werkzeug is fantastic. We used it with jinja2[1], SQLAlchemy[2], and flatland[3] with great success.

[1] http://jinja.pocoo.org/2/ [2] http://www.sqlalchemy.org/ [3] http://bitbucket.org/jek/flatland/overview/

Re:Ask HN: What Web frameworks exist around Python? by emmett on Sunday May 17, 2009 @04:07PM (#613889)
Re:Ask HN: What Web frameworks exist around Python? by sundeep on Monday May 18, 2009 @06:58PM (#615858)
Maybe the OP wanted the opinions of savvy , knowledgeable users of python web frameworks as well.
Re:Ask HN: What Web frameworks exist around Python? by russell on Sunday May 17, 2009 @04:59PM (#613950)
The reason that there are so many frameworks is that writing one used to be a rite of passage for Python programmers. It was so easy to write your own.

FWIW Guido settled on Django. I dont know if he has changed his mind since.

Re:Ask HN: What Web frameworks exist around Python? by derwiki on Sunday May 17, 2009 @05:38PM (#613971)
I started diving into Django a few months ago for a side project, and haven't looked back. I know a ton of Django programmers in the area, and there's a great community for Django devs online.
Re:Ask HN: What Web frameworks exist around Python? by koenbok on Sunday May 17, 2009 @04:17PM (#613910)
I like webob a lot: http://pythonpaste.org/webob/

Also more a library then a framework.

Re:Ask HN: What Web frameworks exist around Python? by marram on Sunday May 17, 2009 @10:05PM (#614218)
I like WebOb+Google App Engine.
Re:Ask HN: What Web frameworks exist around Python? by aheilbut on Sunday May 17, 2009 @04:48PM (#613941)
cherrypy http://www.cherrypy.org/ keeps things simple
Re:Ask HN: What Web frameworks exist around Python? by buster on Sunday May 17, 2009 @04:20PM (#613912)
Easy to use, one-file thingie: http://wiki.github.com/breily/juno

Can do everything thingie: http://www.twistedmatrix.com

Re:Ask HN: What Web frameworks exist around Python? by iamelgringo on Sunday May 17, 2009 @08:17PM (#614107)
Straight up WSGI: http://www.xml.com/pub/a/2006/09/27/introducing-wsgi-pythons...

Django, Pylons, Cherry.py, Turbogears, web.py, Zope, Plone (more of a CMS than a framework, though), Juno, itty, djng, mnml, itty, newf...

I'm sure there's others that I forgot.

Re:Ask HN: What Web frameworks exist around Python? by simanyay on Sunday May 17, 2009 @05:01PM (#613952)
You may find interesting a web frameworks discussion started by Guido: http://www.artima.com/forums/threaded.jsp?forum=106&thre...

At work we use Django and somewhat happy with it. In past I used to use web.py and I liked it.

Re:Ask HN: What Web frameworks exist around Python? by FraaJad on Sunday May 17, 2009 @10:22PM (#614239)
Python developers have tried to move away from the framework thinking for some time.

The emergence of make-your-frameworks (Pylons), lightweight(juno, web.py) frameworks, and pay-for-what-you-eat frameworks (repoze)

Choose libraries based on what serves you best, combine them together using WSGI.

Re:Ask HN: What Web frameworks exist around Python? by apoirier on Monday May 18, 2009 @03:42AM (#614597)
Nagare (http://www.nagare.org) is really different. Not yet-another-MVC-framework clone but based on a true components architecture and using continuation, like the Seaside framework, to free the developers of the Web constraints.
Re:Ask HN: What Web frameworks exist around Python? by JereCoh on Sunday May 17, 2009 @05:22PM (#613960)
Pylons is awesome.
Re:Ask HN: What Web frameworks exist around Python? by rabidsnail on Sunday May 17, 2009 @05:29PM (#613965)
Web.py is great for small projects.

web2py is the new up-and-comer.

zope is the grey-bearded veteran that nobody uses anymore.

twisted is more of a networking framework but people sometimes use it for web apps.

Re:Ask HN: What Web frameworks exist around Python? by FraaJad on Sunday May 17, 2009 @10:19PM (#614236)
By zope, i assume you mean Zope2.

Nobody uses zope? really? Plone, arguably the best Open Source CMS out there is built on Zope2 and continues to be used in ever increasing numbers..

Zope3 is not just a "framework". Its a mindset that allows people to think about solving problems in a robust way, which will remain useful for software's lifecycle.

Zope people realized the danger in building monolithic frameworks after the experiences of Zope2. When they started zope3, they kept the goal of reusability the number one design goal, even at the risk of appearing over-engineered at times. Today, there is no Zope3 and Zope3 is everywhere. Zope lives in Plone, Repoze, Grok and myriad of python libraries.

Lot of good ideas from zope like Zope.Interfaces and Zope component architecture are being outside the zope community.

Django is the Zope2 of 2009.

How many software stacks are still being supported and catered for after 10 years? Zope is a greybeard but saying that nobody uses it implies lack of actual knowledge of python frameworks and how they play together.

Re:Ask HN: What Web frameworks exist around Python? by mcantelon on Sunday May 17, 2009 @03:31PM (#613832)
Juno is a minimalist, Sinatra-like framework: http://wiki.github.com/breily/juno
Re:Ask HN: What Web frameworks exist around Python? by spooneybarger on Sunday May 17, 2009 @03:48PM (#613859)
don't forget the grandaddy of python frameworks: http://www.zope.org/
Re:Ask HN: What Web frameworks exist around Python? by FraaJad on Sunday May 17, 2009 @04:10PM (#613897)
zope is no longer a monolithic framework, but a large collection of libraries, most of which can used outside the main zope framework or even create your own framework. You can use what you want -- the `pay for what you eat` principle.

Repoze - http://repoze.org and Grok - http://grok.zope.org are some of the derivative frameworks that use best of zope libraries without going the whole hog.

Today, zope (specifically zope3) is arguably ahead of other popular frameworks in terms of its reusability, deployment stories, extensive testing.

Combine WSGI + Paste + Zope Component architecture + SQLAlchemy and a choice of other libraries to create a robust framework of your own.

Re:Ask HN: What Web frameworks exist around Python? by mdipierro on Tuesday May 19, 2009 @09:59AM (#616790)
Re:Ask HN: What Web frameworks exist around Python? by flashgordon on Monday May 18, 2009 @12:54AM (#614397)
out of curiosity, what is bothering you about django?
Re:Ask HN: What Web frameworks exist around Python? by Sal on Sunday May 17, 2009 @09:36PM (#614184)
This kind of question smells of lmgtfy.com