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 |
Why Lambda is used in Python?
What is map and filter in python?
What does mean in python?
What does an object() do?
What is pip software in the python world?
What is the use of numpy package?
What is the difference between range () and xrange () in python 3?
What is raw_input?
Does the same python code work on multiple platforms without any changes?
What is syntax in python programming?
Does python have private?
How to convert a list into a tuple?