开发者

Can SQLAlchemy's reflection tools output python source?

开发者 https://www.devze.com 2022-12-26 15:58 出处:网络
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 th

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消