Can you give us more context? Which web framework are you working with? You can have a look at http://pythonwise.blogspot.com/2007/05/websession.html ;)