Re: [sqlalchemy] AutomapBase without binding engine/tables individually?

2016-09-20 Thread Simon King
On Tue, Sep 20, 2016 at 5:36 AM, Rahul Ahuja wrote: > Thanks for the swift reply, Mike! Unfortunately, I had some trouble running > your code. I'm getting > base = automap_base(MetaData()) > File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/ext/automap.py", > line

Re: [sqlalchemy] AutomapBase without binding engine/tables individually?

2016-09-19 Thread Rahul Ahuja
Thanks for the swift reply, Mike! Unfortunately, I had some trouble running your code. I'm getting base = automap_base(MetaData()) File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/ext/automap.py", line 848, in automap_base Base.__name__, AttributeError: 'MetaData' object has no

Re: [sqlalchemy] AutomapBase without binding engine/tables individually?

2016-09-19 Thread Mike Bayer
On 09/19/2016 08:43 PM, Rahul Ahuja wrote: Currently, I'm instantiating a new engine and declarative automap base for each MySQL database I'd like to include in my session and then individually mapping reflected tables to the relevant engines. Some sample code to clarify: | report_engine =

[sqlalchemy] AutomapBase without binding engine/tables individually?

2016-09-19 Thread Rahul Ahuja
Currently, I'm instantiating a new engine and declarative automap base for each MySQL database I'd like to include in my session and then individually mapping reflected tables to the relevant engines. Some sample code to clarify: report_engine = create_engine(URL(drivername='mysql',