def make_token(user, operation, expire=3600):
 s = TimedJSONWebSignatureSerializer(current_app.config['SECRET_KEY'], expire)
 data = {'id': user.id, 'op': operation}
 return s.dumps(data)

def make_token ( user , operation , expire = 3600 ) : s = TimedJSONWebSignatureSerializer ( current_app . config [ 'SECRET_KEY' ] , expire ) data = { 'id' : user . id , 'op' : operation } return s . dumps ( data )
generates a json web signature .