Connecting to postgres via pg8000 from SqlAlchemy worked fine until I enabled SSL on postgres.
db = create_engine(\'postgresql+pg8000://user:pass@hostname/db
probably you need to add connect_args dict:
db = create_engine('postgresql+pg8000://user:pass@hostname/dbname', connect_args={'sslmode':'require'}, echo=True).connect()