SQLAlchemy - 漂亮的打印SQL查询结果

时间:2016-07-23 21:44:35

标签: python orm sqlalchemy ipython flask-sqlalchemy

在Ruby控制台中,可以以非常人性化的方式显示SQL查询结果(ActiveRecord + Hirb):

>> Tag.all :limit=>3, :order=>"id DESC"
+-----+-------------------------+-------------+-------------------+-----------+-----------+----------+
| id  | created_at              | description | name              | namespace | predicate | value    |
+-----+-------------------------+-------------+-------------------+-----------+-----------+----------+
| 907 | 2009-03-06 21:10:41 UTC |             | gem:tags=yaml     | gem       | tags      | yaml     |
| 906 | 2009-03-06 08:47:04 UTC |             | gem:tags=nomonkey | gem       | tags      | nomonkey |
| 905 | 2009-03-04 00:30:10 UTC |             | article:tags=ruby | article   | tags      | ruby     |
+-----+-------------------------+-------------+-------------------+-----------+-----------+----------+
3 rows in set

是否有一个模块允许我在IPython中以类似的方式显示SQLAlchemy结果集?

0 个答案:

没有答案
相关问题