How to Handle JWTs in Python

I am able to generate a jwt using python, but when I go to jwt.io, enter my generated token, add my secret (to verify signature), and then enable ‘Secret base64 encoded’ (with my secret value), I see the signature changes. Disable, it goes back to my generated token. How can I generate a token that has the signature base64 encoded? i’ve tried all kinds of things (I did split out the header/payload since they don’t change, and tried to ‘base64 encoded’, but nothing seems to work. I’ve googled around, I see a few other folks have the same question, one guy actually seemed to have found the answer using java, but I can’t seem to replicate his answer in python.