@ -1658,14 +1658,14 @@ db = connector.connect(host=<str>, user=<str>, password=<str>,
< / code > < / pre > < / div >
< / code > < / pre > < / div >
< div > < h3 id = "encode-1" > Encode< / h3 > < pre > < code class = "python language-python hljs" > < bytes> = bytes(< str> , < span class = "hljs-string" > 'utf-8'< / span > ) < span class = "hljs-comment" > # Or: < str> .encode('utf-8') < / span >
< bytes> = bytes(< coll_of_ints& gt; ) < span class = "hljs-comment" > # Ints must be in range from 0 to 255. < / span >
< div > < h3 id = "encode-1" > Encode< / h3 > < pre > < code class = "python language-python hljs" > < bytes> = bytes(< coll_of_ints& gt; ) < span class = "hljs-comment" > # Ints must be in range from 0 to 255. < / span >
< bytes> = bytes(< str> , < span class = "hljs-string" > 'utf-8'< / span > ) < span class = "hljs-comment" > # Or: < str> .encode('utf-8') < / span >
< bytes> = < int> .to_bytes(n_bytes, byteorder=< span class = "hljs-string" > 'big|little'< / span > , signed=< span class = "hljs-keyword" > False< / span > )
< bytes> = < int> .to_bytes(n_bytes, byteorder=< span class = "hljs-string" > 'big|little'< / span > , signed=< span class = "hljs-keyword" > False< / span > )
< bytes> = bytes.fromhex(< span class = "hljs-string" > '< hex> '< / span > )
< bytes> = bytes.fromhex(< span class = "hljs-string" > '< hex> '< / span > )
< / code > < / pre > < / div >
< / code > < / pre > < / div >
< div > < h3 id = "decode-1" > Decode< / h3 > < pre > < code class = "python language-python hljs" > < str > = str (< bytes> , < span class = "hljs-string" > 'utf-8'< / span > ) < span class = "hljs-comment" > # Or: < bytes> .decode('utf-8') < / span >
< li st> = li st(< bytes> ) < span class = "hljs-comment" > # Returns ints in range from 0 to 255. < / span >
< div > < h3 id = "decode-1" > Decode< / h3 > < pre > < code class = "python language-python hljs" > < li st> = li st(< bytes> ) < span class = "hljs-comment" > # Returns ints in range from 0 to 255. < / span >
< str > = str (< bytes> , < span class = "hljs-string" > 'utf-8'< / span > ) < span class = "hljs-comment" > # Or: < bytes> .decode('utf-8') < / span >
< int> = int.from_bytes(< bytes> , byteorder=< span class = "hljs-string" > 'big|little'< / span > , signed=< span class = "hljs-keyword" > False< / span > )
< int> = int.from_bytes(< bytes> , byteorder=< span class = "hljs-string" > 'big|little'< / span > , signed=< span class = "hljs-keyword" > False< / span > )
< span class = "hljs-string" > '< hex> '< / span > = < bytes> .hex()
< span class = "hljs-string" > '< hex> '< / span > = < bytes> .hex()
< / code > < / pre > < / div >
< / code > < / pre > < / div >