Can SQLAlchemy's reflection tools output python source?
I want to reflect a schema using SQLAlchemy's MetaData.reflect()
method, so that I can have a cache of th开发者_StackOverflowe current schema. How can I do this?
A simple and supported way to cache the result of reflection is to just pickle the MetaData object. If you prefer to generate Python code that initializes the metadata, then there's a tool called sqlautocode.
精彩评论