Here’s my first attempt at an implementation of HTTP Basic authentication for web.py. It’s not perfect but it seems to work. Of course you shouldn’t use it for anything real, since Basic is completely unsafe. I tried it more as a proof-of-concept; I wanted to know whether it was possible to make a generalized HTTP authentication module before tackling Digest.

It’s been a long time since I tried Python, my first programming language, and now I convinced myself I really dislike it — especially after creating a Scheme CGI app on the same week as a Python one. Web.py is really a breeze, though, I wish we had more “frameworks” like it.