Created
July 7, 2015 10:50
-
-
Save shouhei/d2b298f34030d7dac11f to your computer and use it in GitHub Desktop.
既存のDBからテーブル情報を持ってくる奴
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from sqlalchemy import * | |
| db = create_engine('sqlite:///test.db') | |
| metadata = MetaData(bind=db, reflect=True) | |
| for tables in metadata.tables: | |
| for row in tables.select().execute(): | |
| print(row) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment