What modules should I consider in Python if I want to use CGI sessions?

Given that I do not know Python web frameworks and would like it to be very simple at the moment (since I am very stupid), are there simplified simple "batteries" for the prototype of fragmentary durability, including modules for this? (It is too early in the Python career to evaluate the framework, select it and study it.) I see a module called "Cookie" that can serve as the basis, but nothing depends on the session.

I am familiar with the basic concepts of a session, using them in a classic ASP and hit the nuts and bolts of them in Perl, but I don't see much for Python. The glass looks interesting, but then the documentation seems to require middleware with WSGI, and I will return to the infrastructure problem.

I found an old recipe on ActiveState for sessions that obviously could use some processing. The information held is not something that anyone could clean up because, although I am generally quite security conscious, I would like to be a little weaker with this prototype.

Or is it a roll problem?

I will use Python 2.6 for IIS 7.0.

+3
source share
3 answers

I think web2py (web framework) is enough for you. I think this is the easiest way to make a website or web service. It will also be easier than understanding Cookie or other python modules related to web things.

You can start a session by simply typing:

session.your_session_name = "blabla" # or whatever you want to store

cookie, .

web2py . web2py.py. ( python 2.6.) examples -.

Python cookie , , , .

+3

CherryPy . , , , WSGI, .

, SO, , CherryPy. , .

, IIS CherryPy.

0

WSGI , . - Python Python -, CGI. WSGI app CGI, . wsgiref.handlers.CGIHandler().run(app), docs .

, Beaker WSGI ( CGI) - , Beaker docs ( ) run ( wsgi_app, , , , , , a session.save, , , , Beaker ).

, , Beaker - WSGI- , - , - "-y", WSGI ( CGI - ).

BTW, WSGI IIS isapi-wsgi ( "", IIS ;-). , WSGI ( - ), - ( , run ; ) CGI, IIS ISAPI, Google App Engine

0

Source: https://habr.com/ru/post/1724685/


All Articles