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 much do python programmers make?
What is Dict and List comprehensions are?
What is difference between list and set in python?
How do I install pip?
How will you get a 10 digit zero-padded number from an original number?
How to use *args and **kwargs in python?
What is the difference between range & xrange? Explain?
Is Python a good choice for web development
Is __ init __ necessary in python?
Is python a low level language?
What is python coded in?
How would you convert a string into lowercase in python?