[GNC] Help with Python interface
Sam Bull
h1tsfx at sambull.org
Sun Apr 13 07:11:45 EDT 2025
I'm trying to figure out how to use the Python bindings, but the documentation is almost
non existent. One of the suggestions is to use help() where everything is documented as
"wrapper method for function", so I don't see how that is useful at all...
(Also, the docs tell me to contact gnucash-devel for further help, but my email
was rejected telling me to contact gnucash-user instead...)
I'm trying to import transactions from bank accounts through a custom API. I can create a
session and find the account I want to import transactions to, and I have some sample code
that may work to insert new transactions.
I think the things I still need, but can't seem to figure out are:
A way to search for transactions (or splits maybe?) in the account. I see a method to
search by description, but will probably want to search by a combination of notes, date
and amount. I could also implement the search myself if I could figure out a way to get
all (recent) transactions for an account.
This should allow me to avoid importing transactions that already exist, both
created by the import previously (maybe storing a unique ID in the notes) or matching
up to a manually created transaction on date/amount.
This can probably also allow the script to learn what the other splits should be.
e.g. By looking at previous transactions to the same entity, it can automatically set
the new transactions to point to the same account.
It would probably also make sense to be able to reconcile transactions. I'm not clear
on what APIs/steps would be needed to reconcile fully. e.g. Can I initiate a
reconciliation using the account balance and ensuring that the new account balance in
gnucash matches at the end of the reconciliation, all in a script?
Thanks,
Sam
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 195 bytes
Desc: This is a digitally signed message part
URL: <http://lists.gnucash.org/pipermail/gnucash-user/attachments/20250413/0157053d/attachment.sig>
More information about the gnucash-user
mailing list