def sync(db): print "Sync Transactions:" for bank in db.get_accounts(): print "\t Syncing %s" % bank["acct_id"] data = mymint.ofx_server.get_data(bank) ts = mymint.ofx_import.xml(data) db.add_transaction(ts) print "Database now contains %d transactions" % len(db.get_transactions())
def list(db): print "Accounts:" for a in db.get_accounts(): b = sorted(a) print "" print a["acct_id"] for key in b: print "\t"+key+": "+a[key]