First, SQLAlchemy is awesome ... Everything that others cannot do out of the box works like a charm in this ORM.
The solution you may want includes Hibernate:
mapping the postgres array to hibernate might be interesting for you. Basically, all the suggestions you'll see are related to writing the UserType extension. This also applies to Postgres Enums types (and probably hstore, but this will only be an assumption). An example of this type of userType can be found on the Hibernate forums . This detailed article explains the interface in some detail. After writing UserType, you need to annotate the property , and Hibernate will be able to perform the mapping. In newer versions (I used it with Hibernate 4.x) the interface has changed a bit, but you canβt understand anything.
source share