views:

1063

answers:

10

I'm looking for a framework which is appropriate for beginners (in Python and web development).

I already found out about Django and web.py. I think that one of the most important things for me is good documentation.

Thanks for the help, Dan

+10  A: 

I think Django has some of the best documentation of any project I've worked on. That's the reason we chose it over Turbogears two years ago, and it's been the best technology choice we've made.

andrew
I second Django. Really nice framework and API. I feel its the way web frameworks should work.
Bazman
I agree that the documentation is better than TurboGears. However, I haven't actually used either one so I can't say which is better/easier to use.
crystalattice
+3  A: 

Django is amazingly good. Guido uses it (working at Google). It's the main reason why i find myself working more in Python than in Lua.

Javier
+2  A: 

DanJ, here's a pretty good list of all the known Python frameworks: http://wiki.python.org/moin/WebFrameworks

I would recommend looking at the wikipedia articles for Django, Turbogears, Pylons, etc. [I wrote an article on web.py once, but it got deleted :-(] They explain the philosophical and component differences between the frameworks pretty well.

Personally, I like TurboGears a lot since it is based on well-known components, CherryPy (for web serving and URL routing), Kid (for templates), and SQLObject (for object-relational mapping). I like that they've resisted the urge to "roll your own" for all the components, and I feel that the result is very Pythonic and easy to get started with.

But you should look at some code samples and tutorials, and decide what suits you best.

Dan
+1  A: 

You should also take a look at web2py which has good docs and is a very nice framework for building wep apps.

davidavr
+1  A: 

You might want to look at Karrigell. It has multiple options for programming syntax, e.g. pure Python, pure HTML w/ Python scripts, combination, etc. I don't know how well it scales because I haven't used it for several years but it's good for getting your feet wet w/ web frameworks.

crystalattice
Absolutely excellent for beginners and those who like flexibility, and the documentation is pretty good, albeit in kind of French-sounding English. Version 3.0.1 made a few things more consistent, and I use it for most of my non-.NET web work.
JasonFruit
+1  A: 

Echoing the answer of few, I suggest Django. for some simple reasons:

  1. It follows standard MVC architecture.
  2. You can modularise your entire application right from db modeling.
  3. Extensive documentation and free online example/project based books available.
  4. Many open source web based projects for reference available.
Viky
+1. Except Django is not MVC but MTV (model-view-template).
muhuk
A: 

I assume you are talking about a web framework. I have used CherryPy, and found it quite useful. Try using each one to code a simple solution, and see how much it lines up with your style of programming.

gregturn
+3  A: 

web.py?

It's extremely simple, and Python'y. A basic hello-world web-application is..

import web

 urls = (
     '/(.*)', 'hello'
  )

class hello:        
    def GET(self, name):
        i = web.input(times=1)
        if not name: name = 'world'
        for c in range(int(i.times)):
            print 'Hello,', name+'!'

if __name__ == "__main__": web.run(urls, globals())

..that's it.

I found Django forced a lot of it's own conventions and code layout, and I could never remember the middleware/shortcuts imports, and all the other "magic" that is pretty much required to write anything. I found it was closer to Ruby on Rails than a Python web-framework.

With web.py, you can write an entire, functioning web-application without using any of web.py's helper modules - the only thing you have to do is import web and setup the URLs, which is rather unavoidable. (the last line in the example runs the development web-server)

It has lots of stuff in it, like an database API, form helpers, a templating engine and so on, but it doesn't force them on you - you could do all your HTML output by print "Using <b>%s</b>" % (" string formating ".strip()) if you wished!

Oh, while I have emphasised the simplicity, web.py is what http://reddit.com is written in, so it's also proven very capable/reliable. Also, this post by the web.py author is a very good explanation of why I much prefer web.py over Django

dbr
Alas, reddit is now written in Pylons, last I heard. I do like web.py for small projects *a lot* though.
Gregg Lind
A: 

I've written web-apps with raw wsgi. Perhaps rolling out my own library at some point. I don't just like about large frameworks and such. I learned to hate http while writing in raw wsgi. You don't really like it after you realise how much stupid parsing and interpretation you need to upload a file.

Because of wsgi, python has tons of frameworks of different qualities. If you want to try my way, I'd guess you'd like to know werkzeug perhaps. It provides some things when you don't yet know how to do them. It only has perhaps too much of a 'framework' for me. In the end very well written framework ought exceed what I've written in wsgi though.

Cheery
+1  A: 

Wekrzeug is worth mentioning as well. It's not a full stack web framework. It is a low level WSGI framework. (30 Minute Wiki Screencast)

muhuk