def base64_encode(string):
    string = want_bytes(string)
    return base64.urlsafe_b64encode(string).strip(b'=')
base64 encodes a single bytestring (and is tolerant to getting
dataset/ETHPy150Open GeekTrainer/Flask/Work/Trivia - Module 5/env/Lib/site-packages/itsdangerous.py/base64_encode