You can do something similar with TypeEngine.with_variant :
from sqlalchemy.types import PickleType from sqlalchemy.dialects import postgresql HybridType = PickleType() HybridType = HybridType.with_variant(postgresql.HSTORE(), 'postgresql')
This creates a new type of HybridType that you can use like any other type, with the caveat that it will generate an HSTORE column in Postgres and PickleType everywhere.
Kurt raschke
source share