Yes it is possible to create SQLAlchemy models that work on both PostgreSQL and
SQLite. I've done it myself. It works ok for simple models and it is
relatively easy to mimic Postgres functions as SQLite UDFs.
However it will get harder if you need to use RETURNING queries or other
postgres go
I have a little code using sqlalchemy.ext.compiler'
from sqlalchemy import Table, Column
from sqlalchemy.ext.compiler import compiles
from sqlalchemy.sql.expression import HasPrefixes
from sqlalchemy.sql.expression import Executable
from sqlalchemy.sql.expression import ClauseElement
#
# EXPLAIN