[GNC-dev] GnuCash python bindings - API description

Manfred Usselmann manfred at usselmann.de
Mon Oct 19 15:08:33 EDT 2020


Am 19.10.2020 18:07, schrieb John Ralls:
>> On Oct 19, 2020, at 3:38 AM, Manfred Usselmann <manfred at usselmann.de> 
>> wrote:
>> 
>> Hi,
>> 
>> I've just started to use the python interface again after several 
>> years and the following methods of the Transaction object seem to be 
>> no longer available:
>> 
>> SetDateEnteredTS()
>> SetDatePostedTS()
>> 
>> Is there any description of the available methods and properties?
>> 
>> I only found 
>> https://code.gnucash.org/docs/MASTER/classpython_1_1gnucash__core_1_1Transaction.html, 
>> which seems to be very uncomplete?
>> 
>> I would appreciate a pointer where to find a description of what is 
>> available or the source code which I could analyze to retrieve this 
>> information.
> 
> The sources are at https://github.com/gnucash/Gnucash.
> The API documentation is at https://code.gnucash.org/docs/MAINT. There
> is not much separate documentation for the python bindings, best to
> read the comments in the sources, bindings/python.

OK, thanks, this did help me further.

On the page 
https://code.gnucash.org/docs/MAINT/gnucash__core_8py_source.html 
(python.gnucash_core.Transaction Class Reference) I found a link to 
gnucash_core.py  
https://github.com/Gnucash/gnucash/blob/master/bindings/python/gnucash_core.py 
(s.a. https://code.gnucash.org/docs/MAINT/gnucash__core_8py_source.html)

It contains e.g.

  # Transaction
  Transaction.add_methods_with_prefix('xaccTrans')

Those methods starting with xaccTrans can be found in

https://github.com/Gnucash/gnucash/blob/maint/libgnucash/engine/Transaction.c 
  / Transaction.h
or
https://code.gnucash.org/docs/MAINT/group__Transaction.html


Regards,
Manfred


More information about the gnucash-devel mailing list