pip install pyjwt // Instead of pip install jwt // python file import jwt encoded_jwt = jwt.encode({'some': 'payload'}, 'secret', algorithm='HS256') decoded_jwt = jwt.decode(encoded_jwt, 'secret', algorithm='HS256;)