web.py Released

Remember Aaron Swartz’s post on rewriting reddit.com from Lisp to Python in 7 days? Besides a “blow” to the Lisp community (people you don’t want to offend), it also introduced issues with existing Python web application frameworks. The end result? web.py, and 0.1 was released today under an open-source license. You can download the Python file here.

Yes, the whole “frame work” comes in one single Python module. 1,042 lines and that’s all, where almost 300 of them are for HTTP 500 page. It claimed to be the “anti-framework framework” that doesn’t get into your way. Actually web.py is so primitive, it is no more than a thin wrapper on top of CGI plus a few helper functions. It has a regex based URL dispatcher, a few database function wrapping around PostgreSQL, WSGI handler and a wrapper function around Cheetah. That’s all.

Comparing web.py with flashy MVC frame works like Django or TurboGears is really like comparing apple and orange. Django or TG has relatively higher setup cost, but makes CRUD-style web applications a breeze, if your brain can fit into their model (which are actually pretty excellent models, btw). web.py on the other hand, can truly be a replacement for PHP — easy to get started if all you need is a “Hello World” app. It doesn’t “get into your way” because it provides pretty much no way. You’ll end up writing your own framework to perform common tasks like session management, caching, authentication, form generation, etc.

So far web.py 0.1 feels a bit disappointing. It is no longer 1996 where CGI.pm is all you need for your dynamic content. I’ll stick to Django, TurboGears and probably Zope 3.

Update: Paul Bissex also wrote about the web.py, and he said:

In the end I think that whatever small amount of energy dissipation web.py causes will be more than offset by the ideas that it (by which I mean Aaron, really) injects into the discussion of what a web framework should be and do.

While I don’t see web.py useful in my case, but Paul is right — more frameworks generates more ideas which benefits everyone in the game.

Update: Robert Sayre questioned the license term of web.py. If web.py is indeed released under GPL3-alike term where the whole website needs to be released under GPL if it is poisoned with a GPL library, then I’ll say forget about it.

Category: General | Wed, 4 January 2006 1:43 pm
Tags: ,

Links to This Article

  1. Sat, 28 January 2006 9:36 am
    Guido wants your input on Python web frameworks | FuCoder.com
  2. Thu, 23 March 2006 8:49 pm
    web.py Gone Public Domain | FuCoder.com

Comments

1.
Avatar for J
Posted by J on Wed, 11 January 2006 1:22 am

Isn’t GCC licensed under the GPL (v2 I think) ? If so, there’s no obligation to release source code created in C that’s compiled with GCC, so how does that differ from a webapp vs. web.py?


2.
Avatar for Scott Yang
Posted by Scott Yang on Wed, 11 January 2006 7:36 am

There’s no obligation to release source code created in C, because your application does not include GCC in anyway but maybe some libraries which might be licensed differently.

web.py is not released under GNU GPL, but rather Affero GPL. Read the article by Robert Sayre I’ve linked to, and cast your own judgement…


3.
Avatar for J
Posted by J on Mon, 16 January 2006 9:28 pm

IANAL, but

“must offer an equivalent opportunity for all users interacting with your Program through a computer network to request immediate transmission by HTTP of the complete source code of your modified version or other derivative work.”

that does at least cover any modifications you made to web.py. I don’t know if the web app is a derivative work. If so, web.py indeed suffers from GPL poisoning. Wouldn’t it be better if it were licensed under LGPL?


Add a comment

Gravatar is used. Email address is required but will not be displayed. Please keep your comment on topic. No spamming and/or bad language. First time poster will be moderated. Scott reserves the right to delete/edit your comments.