Can SQLAlchemy reflection tool output python source?

I want to mirror the schema using SQLAlchemy method MetaData.reflect()

so that I can have a cache of the current schema. How can i do this?

+2


a source to share


1 answer


A simple and maintainable way of caching the reflection result is to simply mock the MetaData object. If you prefer to generate Python code that initializes metadata, then there is a tool called sqlautocode .



+1


a source







All Articles