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 |
What is a panda in python?
What are accessors, mutators, and @property?
What is python list function?
Which programming language is a good choice between java and python?
What is the other way of checking truthiness?
What are all the operating system that python can run on?
Which is better java or python?
How do you append to a file?
How do you make an array in Python?
What is %s %d in python?
What advantages does Python offer as a programming tool in today's environment?
What is the lambda?