sqlalchemy

import sqlalchemy
e = sqlalchemy.create_engine('sqlite:///index.db')

conn=e.connect()
cur=conn.execute("select * from Document where word='tim'")
cur.fetchall()
     [('tim', 'tim doc1')]

cur=conn.execute("select word,file from Document where word='tim'")

cur.fetchall()
     [('tim', 'tim doc1')]