Created
March 10, 2022 23:33
-
-
Save NguyenDa18/2aabb01bcaa4c4071d49d98164b1e66c to your computer and use it in GitHub Desktop.
Base64 Encoding/Decoding String with Python
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import base64 | |
encoded_string = base64.b64encode(bytes(string, 'utf-8')) | |
# source: https://stackoverflow.com/questions/21478086/how-to-store-binary-data-in-dynamo-with-boto | |
email_addreses = [base64.b64decode(item['EmailAddress'].value).decode('utf-8') for item in queried_items] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment