Web session in pure python
I am crea开发者_如何学Goting a web site using python and html/css. I am not using any web framework just using pure python. I want to implement session in this site but cant find appropriate code/example for it. Please somebody help me out in this.
If possible can you please send me a code or link.
Python has a Cookie
module in its stdlib that allows you to create and manipulate cookies in a server written in Python. Writing a HTTP server in Python is easy - just use BaseHTTPServer
- again from the stdlib. With the Cookie
module it shouldn't be difficult to implement sessions, since sessions are usually based on cookies.
You want to write a WSGI app.
You want to use a web-framework for writing a web-site. Everything else is un-needed minimalism.
精彩评论