import base64


def base64_encode(string):
	"""
	Encodes data with MIME base64
	This encoding is designed to make binary data survive transport through transport layers that are not 8-bit clean, such as mail bodies.
	"""
	return base64.b64encode(string)