By default the SQLAlchemy use public schema for Base. below is some code
self.Base = automap.automap_base()
self.Base.prepare(self.engine, reflect=True)
Session = sessionmaker(bind = self.engine)
self.session = Session()
insp = reflection.Inspector.from_engine(self.engine)
print(insp.get_table_names())
but this code lists me the tables of only public schema like this
['drs', 'spatial_ref_sys', 'users']
I want to handle all the tables from different schema. and not just the one in public. Any good way to get this done without much hassle ?
UPDATE 1 : Here is similar example with similar problem but with declarative case
Using a different schema for the same declarative Base in sqlalchemy