A python library to work with GnuCash books, a successor of the piecash library, built on top of SQLAlchemy 2.
pip install piecash2
from piecash2 import open_book
# open the gnucash book (sqlite3 file)
Session = open_book("mybook.gnucash")
# retrieve the module
piecash = Session.module
with Session() as session:
# query all accounts in the
for account in session.query(piecash.Account).all():
print(account.name)
Read the CONTRIBUTING.md file.