Maintain session in command line [PYTHON] -


i working python , flask framework. have 1 python class different methods. have module responsible maintaining session stuffs. program flow sequential(multiple requests 1 after meaning second request due first one.) request-response format.

my problem is, whenever request made server, last session destroyed , new session instance created while making request command line.

is there session-key or that? how server knows client request of last established session?

[edit] here code snippet:

 def second_request():     if session['first']:         return true      return false  class test():     def operate(self,):         if second_request():             #increase loggedin count 1 session['user'] or                 return true         else:             self.set_first()             return false      def set_first(self, ):         session['first'] = true 

i want call(from terminal) operate method of test class , go in if loop.


Comments

Popular posts from this blog

Android layout hidden on keyboard show -

google app engine - 403 Forbidden POST - Flask WTForms -

c - Why would PK11_GenerateRandom() return an error -8023? -