A callable that accepts a bytes parameter and returns a text representation of it. The callable is invoked for SQLite values with the TEXT data type. By default, this attribute is set to str.
sqlite3/Connection.text_factory
Connection.text_factory