Skip to content

Instantly share code, notes, and snippets.

@orenmazor
Created January 12, 2012 05:27
Show Gist options
  • Save orenmazor/1598946 to your computer and use it in GitHub Desktop.
Save orenmazor/1598946 to your computer and use it in GitHub Desktop.
python snippet to decode base64
from base64 import b64decode
for attachment in inbound_json["attachment"]:
blob = b64decode(attachment["Content"])
file = open(attachment["Name"],"w")
file.write(blob)
file.close()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment