MCPcopy Create free account
hub / github.com/apify/crawlee-python / encode_base64

Function encode_base64

tests/unit/_utils/test_sitemap.py:74–76  ·  view source on GitHub ↗

Encode bytes to a base64 string.

(data: bytes)

Source from the content-addressed store, hash-verified

72
73
74def encode_base64(data: bytes) -> str:
75 """Encode bytes to a base64 string."""
76 return base64.b64encode(data).decode('utf-8')
77
78
79async def test_sitemap(server_url: URL, http_client: HttpClient) -> None:

Calls

no outgoing calls

Tested by

no test coverage detected