Codecs Module: Mastering Text Encoding and Decoding
TL;DR
The codecs module provides functions to encode and decode data between bytes and text using various character encodings (UTF-8, ASCII, etc.), with flexible error handling strategies for dealing with malformed data.