base64_encode
Base64 encode a string of bytes or text. The resulting bytes are safe to use in URLs.
def base64_encode(string): ...
Base64 encode a string of bytes or text. The resulting bytes are safe to use in URLs.
Parameters
| Name | Type | Description |
|---|---|---|
| string | Union[str, bytes] | The input text or byte sequence to be encoded into a URL-safe format. |
Returns
| Type | Description |
|---|---|
bytes | The URL-safe Base64 encoded bytes with any trailing padding characters removed. |