1. Install
pip install itsdangerous
2. Call module, pass parameters instantiate an object, the object used for encryption and decryption.
# Import module, as recommended aliases
from itsdangerous Import TimedJSONWebSignatureSerializer as the SSS
# Set specific secret key information, and timely information, create an instance S = the SSS ( 'IT sakey ' , 7200 ) # encrypted information, encrypted code formed Mystery = s.dumps (info) ... # gain access to encrypted information, using the same instance object decryption result = s.loads (mystery)