pyinfra/test/utils/server.py
2022-04-26 16:15:54 +02:00

10 lines
186 B
Python

import base64
def bytes_to_string(data: bytes) -> str:
return base64.b64encode(data).decode()
def string_to_bytes(data: str) -> bytes:
return base64.b64decode(data.encode())