import base64


def to_base64(s) -> str:
	"""Converts str or bytes to Base64 string"""
	if isinstance(s, bytes):
		return base64.b64encode(s).decode("utf-8")
	else:
		return base64.b64encode(bytes(str(s), "utf-8")).decode("utf-8")