Best way to reset keys which expires in few minutes in python
<p>I have to reset my key (something like session key) every two hours, which is going to expire after that. which is the best way to implement a reactivation feature in my code?</p>

<p>there is no method available for me to check whether my key is still valid other than checking the status by performing some actions which require valid keys.</p>

<p>I'm looking for some solution with which i can use it for flexible expiring time (which is passed as a parameter) for my key.</p>
