[sqlalchemy] SQLAlchemy 1.1b2 TypeError: the JSON object must be str, not 'bytes' with mysql 5.7.12 and JSON field type

2016-07-23 Thread Eric Wittle
I'm trying to include a JSON field in a table with mysql 5.7.12 and sqlalchemy 1.1b2. I've successfully inserted JSON into the database, but when I load the record containing the JSON, I get the TypeError shown in the subject. The database was created with charset utf8, and the connect string

[sqlalchemy] Leveled single table inheritance without declarative API

2016-07-23 Thread Ameretat Reith
I'm trying to make three `Guy', `Father' and `Father1980' models mapped to two `guys' and `fathers' tables. Fathers will inherit Guys and Father1980 will inherit Fathers. So I coded it as: from sqlalchemy import (Table, Binary, Column as C, String, Integer, ForeignKey,