Easy web session module with Python?

Alan Kennedy alanmk at hotmail.com
Thu Oct 14 10:49:28 EDT 2004


[Johnathan Doe]
> Hi,  I'm looking for an easy way to do web development with Python 
> (session handling a-la ASP/JSP/PHP, that kind of thing).  I've looked at 
> PythonWeb.org but it has bugs because it's not tested on UNIX platforms 
> it seems (I've created some patches and sent them to the author), and a 
> quick browse through PyPI in the mature/stable packages doesn't reveal 
> much hope, unless I've missed something.  I've googled for session 
> handling with Python, and it seems something called "pso" would be ok, 
> but that is only mod_python as far as I know, and I may need something 
> that works with cgi only hosts.

Ah, the perennial problems with python web software. You find something 
that is close to what you need, but it doesn't work on the platform or 
server you want, or it is so deeply embedded in some given framework 
that it not reusable outside that framework without a total rewrite.

> I could write my own I suppose, but surely someone has done this before? 

Yes, this particular wheel has been reinvented before, again and again 
and again and ..........

>  Thanks for any tips!

There is a new python web standard called WSGI that seeks to refactor 
out these kinds of reusable components and make them portable not just 
between servers but also between frameworks. WSGI refers to these as 
"middleware components".

http://www.python.org/peps/pep-0333.html

Although WSGI is still a standard in formation, I recommend that you at 
least take a look at it: by starting down a standardised road, you will 
at least have a chance to reuse other peoples components.

I know of only one WSGI-compliant session module: the one written by Ian 
Bicking, principal author of WebWare. It is not fully released yet, i.e. 
it is only available from Ian's Subversion source code repository. You 
can find out how to access that here

http://mail.python.org/pipermail/web-sig/2004-October/000941.html

HTH,

-- 
alan kennedy
------------------------------------------------------
email alan:              http://xhaus.com/contact/alan



More information about the Python-list mailing list