Describe how to use Sessions for Web python.
Answer / chaitanya
Sessions are the server side version of cookies. While a cookie preserves state at the client side, sessions preserves state at server side.
The session state is kept in a file or in a database at the server side. Each session is identified by a unique session id (SID). To make it possible to the client to identify himself to the server the SID must be created by the server and sent to the client whenever the client makes a request.
Session handling is done through the web.session module in the following manner:
import web.session session = web.session.start( option1, Option2,... )
session['myVariable'] = 'It can be requested'
| Is This Answer Correct ? | 0 Yes | 0 No |
How to call an external command in python?
What is the Java implementation of Python popularly known as?
What is defined isalpha() in python?
Is python or r more useful?
How would you define a protected member in a python class ?
Can you list down some of the pdb commands for debugging python programs?
Which the command you use to exit help window in python?
Explain the use of *args, **kwargs?
Describe how multithreading is achieved in python?
Is python written in python?
Which methods of python are used to determine the type of instance and inheritance?
What is __ name __ in python?