Hey! I've been asked to store some data from a client in mysql in an encoded format using python. Nothing could be easier, right?
I will later need to decode the same data using mysql exclusively. Given that constraint, I thought that base64 would be the go to since nearly every contemporary data tool that we've heard of is base64-literate.
So from flatfile it goes into the db using python no problem.
When I try to decode the data for warehousing later, the mysql from_base64() function returns a hexadecimal string instead of....ascii string? Or whatever. Human readable string.
I've found various hacks online that...should work? But I want to code this as correctly as possible because portability is so important, and it's tough to remember whatever hack you used to get it running five years ago. I'm convinced I'm doing it wrong.
Is there a better way to python-encode data that's consistently reversible using mysql for processing?
Thanks in advance!