PythonDocumentation7. Binary Data Services7. Binary Data Services struct - Interpret bytes as packed binary data Functions and Exceptions Format Strings Byte Order, Size, and Alignment Format Characters Examples Classes codecs - Codec registry and base classes Codec Base Classes Error Handlers Stateless Encoding and Decoding Incremental Encoding and Decoding IncrementalEncoder Objects IncrementalDecoder Objects Stream Encoding and Decoding StreamWriter Objects StreamReader Objects StreamReaderWriter Objects StreamRecoder Objects Encodings and Unicode Standard Encodings Python Specific Encodings Text Encodings Binary Transforms Text Transforms encodings.idna - Internationalized Domain Names in Applications encodings.mbcs - Windows ANSI codepage encodings.utf_8_sig - UTF-8 codec with BOM signature https://docs.python.org/3/library/binary.html