import base64


def encode(data: bytes) -> str:
    """Encode bytes in a base64 str

    Args:
        data (bytes): data to encode

    Returns:
        str: base64 encoded str
    """
    return base64.b64encode(data).decode('utf-8')