Hi! The other day I was building some script to parse some bank extracts and merge it into a GnuCash database through a Python script. GnuCash's offers some Python bindings to interact with it, but the documentation is a bit lacking.
The Python bindings can be understood looking into the sample scripts
and a bit of Python's
But if you want another entry point here is a bit of a sloppy quickstart to see how to open a GnuCash file, read it's transactions and add a new one.
(Also note: I'm not an expert user (or someone with accounting knowledge for that matter) and I won't go into how to use GnuCash generally as a software tool… maybe check it's wiki or it's Quick Start Guide For Business Users for that 🤷.)
What is GnuCash?
According to it's website…
GnuCash is personal and small-business financial-accounting software, freely licensed under the GNU GPL […]. Designed to be easy to use, yet powerful and flexible, GnuCash allows you to track bank accounts, stocks, income and expenses. As quick and intuitive to use as a checkbook register, it is based on professional accounting principles to ensure balanced books and accurate reports.