tags:

views:

169

answers:

2

python has session feature or not, if it is there then how can i use this and which library should i take ???

+1  A: 

Beaker is pretty popular for WSGI reliant Python web apps, but you have to understand that Python is an all-purpose programming language, it is not geared 100% toward the web like PHP.

It would also help if you listed more information about the application you need it in.

meder
+1  A: 

Some Python web frameworks do offer the concept of "session". (The language Python itself, of course, has nothing to do with it!-).

For example, Beaker is an excellent lightweight WSGI middleware that supports sessions; since WSGI is generally the best way to connect any Python web framework with any web server, and of course you can always insert WSGI middleware in WSGI transactions, Beaker (like any other WSGI middleware) is very widely applicable.

Alex Martelli
Thanks...what do you think about mod_python API?is it really useful in my application.actually what i wanna do is. one session variable store my login authentication value whatever it is and pass this value before executing any other script.my script just called as wrapper script...hope i explained well and you understand that what i want to know ?
Rahul S
@Rahul, I think WSGI's much better than `mod_python`: it does not tie you into a single web server, and lets you "plug in" many useful middleware modules -- including ones about authentication as well as others about sessions; **very** modular and flexible -- and you still get to choose what server **and** what framework you like, quite independently.
Alex Martelli
Yes, I wouldn't use mod_python for anything today... far too much lock-in. WSGI is where it's at and mod_wsgi is a good, fast implementation.
bobince