4kpt_IV
Al-seА как на Ваш вопрос отвечает документация? Именно api create_engine?
Я вернулся, но ничего утешительного для меня. Итак, пытаемся воспользоваться Вам советом и почитать
документацию.
convert_unicode=False¶ –
if set to True, sets the default behavior of convert_unicode on the String type to True, regardless of a setting of False on an individual String type, thus causing all String -based columns to accommodate Python unicode objects. This flag is useful as an engine-wide setting when using a DBAPI that does not natively support Python unicode objects and raises an error when one is received (such as pyodbc with FreeTDS).
See String for further details on what this flag indicates.
encoding¶ –
Defaults to utf-8. This is the string encoding used by SQLAlchemy for string encode/decode operations which occur within SQLAlchemy, outside of the DBAPI. Most modern DBAPIs feature some degree of direct support for Python unicode objects, what you see in Python 2 as a string of the form u'some string'. For those scenarios where the DBAPI is detected as not supporting a Python unicode object, this encoding is used to determine the source/destination encoding. It is not used for those cases where the DBAPI handles unicode directly.
To properly configure a system to accommodate Python unicode objects, the DBAPI should be configured to handle unicode to the greatest degree as is appropriate - see the notes on unicode pertaining to the specific target database in use at Dialects.
Areas where string encoding may need to be accommodated outside of the DBAPI include zero or more of:
the values passed to bound parameters, corresponding to the Unicode type or the String type when convert_unicode is True;
the values returned in result set columns corresponding to the Unicode type or the String type when convert_unicode is True;
the string SQL statement passed to the DBAPI’s cursor.execute() method;
the string names of the keys in the bound parameter dictionary passed to the DBAPI’s cursor.execute() as well as cursor.setinputsizes() methods;
the string column names retrieved from the DBAPI’s cursor.description attribute.
When using Python 3, the DBAPI is required to support all of the above values as Python unicode objects, which in Python 3 are just known as str.
В общем, оба варианта попробовал - не работает так, как мне надо.