Getting started
User guide
Reference
Turn bytes or str to str
data (AnyStr) – input bytes or str data
encoding (str, optional) – The encoding with which to decode the bytes. Defaults to ‘utf-8’.
errors (str, optional) – The error handling scheme to use for the handling of decoding errors.
utf8-decoded string
str
Turn bytes or str to bytes
ending (Optional[AnyStr], optional) – add encoded given ending to the end of data. Defaults to None.
encoding (str, optional) – The encoding with which to encode the string. Defaults to ‘utf-8’.
utf8-encoded bytes
bytes