On Thursday, June 7, 2012 12:54:51 PM UTC-4, Ben Hitz wrote: > > > My first tests with Autoload=true had me scrambling to look at the .sql > file or the DB itself to remember what the heck the columns were called. > (So if you paying close attention, I think I just switched the question > from "can I generate simple classes with autoLoad=true" to can I generate > python code for full declarative classes and then save them in a models.py > file (or whatever) >
If I understand your need, you are starting with: Base = declarative.declarative_base() Base.metadata.reflect(engine) and then you would like to be able to generate a basic models.py file using the information in Base.metadata.tables But from your first post, some tables are not present in that dict? >>>> For each table. Should I just introspect the metadata object? I > thought of this but not all the tables were loaded... > Am I understanding your problem correctly? -- You received this message because you are subscribed to the Google Groups "sqlalchemy" group. To view this discussion on the web visit https://groups.google.com/d/msg/sqlalchemy/-/wcTSwNrGPu4J. To post to this group, send email to sqlalchemy@googlegroups.com. To unsubscribe from this group, send email to sqlalchemy+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/sqlalchemy?hl=en.