We're back after a server migration that caused effbot.org to fall over a bit harder than expected. Expect some glitches.

The encodings.base64_codec Module

(New in 2.2) BASE64 codec. Let’s you use the encode and decode string methods for BASE64 encoding/decoding, instead of importing the base64 module.

encoded_data = data.encode("base64")
decoded_data = encoded_data.decode("base64")