I don't know exactly what you are trying to achieve, but when I see session and python in the same sentence, beaker comes to mind. I've only used it with wsgi apps, but the doc says that it works with stand alone applications. http://beaker.readthedocs.org/en/latest/index.html
For authentication and authorization, you could have a look at repoze.who ( http://docs.repoze.org/who/2.0/ ), but it's aimed for wsgi applications. Perhaps you could hack it: http://docs.repoze.org/who/2.0/use_cases.html#api-only-use-cases -- view archives: http://groups.google.com/group/python_inside_maya change your subscription settings: http://groups.google.com/group/python_inside_maya/subscribe
