import sqlite3,json db=sqlite3.connect('file:/www/dk_project/dk_app/trilium/data/document.db?mode=ro',uri=True);db.row_factory=sqlite3.Row ids=['_help_Q2z6av6JZVWm','_help_habiZ3HU8Kw8','_help_MEtfsqa5VwNi'] rows=[dict(r) for n in ids for r in db.execute("SELECT attributeId,noteId,name,value FROM attributes WHERE noteId=? AND name='webViewSrc' AND isDeleted=0",(n,))] assert len(rows)==3 print(json.dumps(rows));db.close()