> On Feb 22, 2019, at 12:38 AM, Geert Janssens <geert.gnuc...@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
_______________________________________________
gnucash-user mailing list
gnucash-user@gnucash.org
To update your subscription preferences or to unsubscribe:
https://lists.gnucash.org/mailman/listinfo/gnucash-user
If you are using Nabble or Gmane, please see 
https://wiki.gnucash.org/wiki/Mailing_Lists for more information.
-----
Please remember to CC this list on all your replies.
You can do this by using Reply-To-List or Reply-All.

Reply via email to