dimanche 3 septembre 2017

How to set a global variable in python flask?

I would like to set a global variable and use it as a trigger of various functions. Each user has a separate global variable. This is used to keep track of previous message data and proceed a conversation. The problem is that how can I manage a separate global variable to each user? The app is running once I deployed it in the server. When I attempt to change the global variable, this variable applies to every user, not just that single user who triggered its the change.

I'm using python flask without a DB.

Thank you.

Aucun commentaire:

Enregistrer un commentaire