snekuity.api ============ .. py:module:: snekuity.api .. autoapi-nested-parse:: The primary module in snekuity. Attributes ---------- .. autoapisummary:: snekuity.api.logger Functions --------- .. autoapisummary:: snekuity.api.siblings_of snekuity.api.accounts_equal snekuity.api.format_xact snekuity.api.format_split snekuity.api.incomplete_xacts Module Contents --------------- .. py:data:: logger .. py:function:: siblings_of(split) Given a split, returns other splits from the same transaction. :return: a list of all splits in the same transaction that are not equal to the given split. .. py:function:: accounts_equal(account_1, account_2) Returns `True` if given accounts are equal, `False` otherwise. Shallow comparison to determine whether the two given accounts are equal in type, name, code, description, commodity, and GUID. Weaker than `account_1.Equal(account_2, check_guids=True)` but still useful because it suppresses logging. .. py:function:: format_xact(xact) Returns a string representation of the given split. .. py:function:: format_split(split, include_xact = True) Returns a string representation of the given split. .. py:function:: incomplete_xacts(base: gnucash.Account, imbalance: gnucash.Account) -> collections.abc.Iterator[tuple[gnucash.Transaction, gnucash.Split, gnucash.Split]] incomplete_xacts(base: str, imbalance: str, session: gnucash.Session) -> collections.abc.Iterator[tuple[gnucash.Transaction, gnucash.Split, gnucash.Split]] Yields all incomplete transactions of a given base account. :param base: the account whose splits are to be iterated. :param imbalance: a reference account for comparison. Can be obtained e.g. by calling: ``root.lookup_by_full_name('Imbalance-EUR')`` :param session: GnuCash session. Used for looking up accounts by name. Mandatory if one or both of `base` and `imbalance` are strings. :return: an iterator that yields triples of transaction, base split, and incomplete split.