[GNC] Are there any add-on modules for Gnucash

John Ralls jralls at ceridwen.us
Fri Feb 22 10:34:57 EST 2019



> On Feb 22, 2019, at 12:38 AM, Geert Janssens <geert.gnucash at kobaltwit.be> wrote:
> 
> 
> I can't remember we ever said it would be possible to write to the GnuCash db 
> from outside of GnuCash. That would mean that **all** accounting constraints 
> should be encoded in the db data structure. I don't think that's possible. 
> Take for example the simple constraint that transactions have to balance. 
> There is no way to encode that in a db data structure.

Our position has always been and will likely always be that we support writing to a GnuCash file or database only through the GnuCash API. That's not the same thing as from inside of GnuCash. 

GnuCash's libraries expose their API through the C calling convention that can be linked by just about any compiled language. You'll need to get the sources for the headers. We also provide Python 3 and Scheme (via Guile) bindings for parts of the API, though the Python bindings aren't built in the Microsoft Windows or MacOS application bundles.

Do bear in mind that the GnuCash libraries aren't bullet-proof and it's still possible to wreck your database even with the GnuCash API if you're not careful (or are carefully malicious). The API is complex and the documentation ranges from pretty good to nonexistent; it can be found at https://code.gnucash.org/docs/MAINT.

On tho other hand, if you just want to create a bunch of transactions you might not need to code anything: The GnuCash 3.x CSV transaction importer is pretty capable.

Regards,
John Ralls


More information about the gnucash-user mailing list