Is there a good way to check if a string is encoded in base64 using Python?
This isn't possible. The best you could do would be to verify that a string might be valid Base 64, although many strings consisting of only ASCII text can be decoded as if they were Base 64.
Check if a string is encoded in base64 using Python