Live data from Hacker News

Ask Hacker News: What Python web framework should I use?

news.ycombinator.com

11–20 of 41 posts

Re: Ask Hacker News: What Python web framework should I use?

#11
post #5

For very small projects (i.e. only a handful of users, no serious performance requirements), I typically use web.py ( http://webpy.org ). It's very simple and offers only very basic functionality, but does a good job of staying out of the way and generally letting you do whatever you want. I've heard from friends that Pylons is also a good option, but I found it to be more complex than I really needed.

hi how can i reach u?

Re: Ask Hacker News: What Python web framework should I use?

#12

I personally like web.py: PROS: * Light and fast, * Really flexible, * Really easy to learn, * Easy to install, * Nice error reports (mostly copied from Django), * No database ORM CONS: * No database ORM, just some helper functions: insert(...), update(...), select(...), etc. You must also build the DB tables by yourself. * Limited documentation.

hi how can i reach u?

Re: Ask Hacker News: What Python web framework should I use?

#13

I personally like web.py: PROS: * Light and fast, * Really flexible, * Really easy to learn, * Easy to install, * Nice error reports (mostly copied from Django), * No database ORM CONS: * No database ORM, just some helper functions: insert(...), update(...), select(...), etc. You must also build the DB tables by yourself. * Limited documentation.

Seconded. It's not really a framework as much as a url mapper. Plus, it's quite small so if you're having trouble understanding something, the source is available.

Re: Ask Hacker News: What Python web framework should I use?

#14

I personally like web.py: PROS: * Light and fast, * Really flexible, * Really easy to learn, * Easy to install, * Nice error reports (mostly copied from Django), * No database ORM CONS: * No database ORM, just some helper functions: insert(...), update(...), select(...), etc. You must also build the DB tables by yourself. * Limited documentation.

hi how can i reach u?

I can help. See profile.

Re: Ask Hacker News: What Python web framework should I use?

#15

I personally like web.py: PROS: * Light and fast, * Really flexible, * Really easy to learn, * Easy to install, * Nice error reports (mostly copied from Django), * No database ORM CONS: * No database ORM, just some helper functions: insert(...), update(...), select(...), etc. You must also build the DB tables by yourself. * Limited documentation.

I stopped using web.py after I had to correct Aaron when he recommended a 'session' implementation that had a massive gaping security hole. http://groups.google.com/group/webpy/browse_thread/thread/2f... If he couldn't spot that when he posted, I don't trust him to spot any other problems with web.py

For a second I didn't get what the big deal was here. Sure you have to keep your pickled python objects in a secure place on your server. Sure you could have problems if someone could get at those, but they would need to crack your server first and then figure out how your app worked. If they could do that you're hosed anyway...

Then it hit me.

He was suggesting you give the pickled object back to the client in the session cookie and load whatever the client sends later right back into the interpreter. Whee!

Re: Ask Hacker News: What Python web framework should I use?

#16

I personally like web.py: PROS: * Light and fast, * Really flexible, * Really easy to learn, * Easy to install, * Nice error reports (mostly copied from Django), * No database ORM CONS: * No database ORM, just some helper functions: insert(...), update(...), select(...), etc. You must also build the DB tables by yourself. * Limited documentation.

I am quite against database ORM, so that's no con for me. Documentation isn't great either but things are generally very easy to figure out.

My only cons (last I checked):

- Connecting to multiple databases is kind of a hack.

- Depreciation of cheetah over aaron's templating system.

So, it's just about perfect for me.

Re: Ask Hacker News: What Python web framework should I use?

#18
In Django you could build the core of either of those two examples in an afternoon. I have done so just for practice. Yes, you won't use 90% of Django's potential. But the 10% you do leverage lets you build something like that very easily.

For a simple blog you would need to write only a few views and templates, and then I would use the the built-in admin system to manage the content. Same sort of situation for the simple news site.

I always get flamed for suggesting to not reinvent the wheel, but if you want to do build something like a quick news site, why not leverage all the pre-existing work you can. Technology is not your differentiating factor. /rant

Re: Ask Hacker News: What Python web framework should I use?

#19

I'm currently working with TurboGears. I evaluated pylons, django and web.py a year ago and made my decision. Here is a summary of my opinions (note from a year ago). pylons: didn't really like the lack of decorators, didn't seem to be an ORM of choice, docs looked weak although the wiki was well stocked with recipies django: really well documented. Seemed to be HUGE and I felt intimidated by it. It wasn't clear to m…

"Didn't seem very modular, you can only use the Django ORM and templating engine."

Very common misunderstanding. You can use Django with SQLAlchemy (I have done in the past). You can use Django with Genshi, or Cheetah, or whatever template engine you like (I would strongly recommend using something like Genshi for outputting XML). It's usually better to stick with the Django ORM though as it will let you use many of the excellent extension applications for Django (such as django-mptt, django-tagging or the Django admin package). The same is not true for the Django template system - replacing it with something else has no disadvantages at all that I can think of.

Post reply on HN