Interactive functions

Function aliases

The following functions are aliases for Core functions:

import finac as f

f.tr(...) # alias for finac.core.transaction_create
f.mv(...) # alias for finac.core.transaction_move
f.rm(...) # alias for finac.core.transaction_delete
f.complete(...) # alias for finac.core.transaction_complete
f.apply(...) # alias for finac.core.transaction_apply
f.stmt(...) # alias for finac.core.account_statement_summary
f.balance(...) # alias for finac.core.account_balance
f.balance_range(...) # alias for finac.core.account_balance_range, in
                     # opposite to the original function, returns dates as
                     # datetime object by default
f.df(...) # alias for finac.df.df

Special interactive functions

finac.format_money(amnt, precision=2)

Format output for money values

Finac doesn’t use system locale, in the interactive mode all numbers are formatted with this function. Override it to set the number format you wish

finac.ls(account=None, asset=None, tp=None, passive=None, start=None, end=None, tag=None, pending=True, hide_empty=False, order_by=['tp', 'asset', 'account', 'balance'], group_by=None, base=None)

Primary interactive function. Prints account statement if account code is specified, otherwise prints summary for all accounts

Account code may contain ‘%’ symbol as a wildcard.

Parameters:
  • account – account code
  • asset – filter by asset code
  • tp – filter by account type (or types)
  • passive – list passive, active or all (if None) accounts
  • start – start date (for statement), default: first day of current month
  • end – end date (or balance date for summary)
  • tag – filter transactions by tag (for statement)
  • pending – include pending transactions
  • hide_empty – hide empty accounts (for summary)
  • order_by – column ordering (ordering by base is not supported)
  • base – specify base asset
finac.lsa(asset=None, start=None, end=None)

Print list of assets or asset rates for the specified one

Currency filter can be specified either as code, or as pair “code/code”

If asset == ‘*’ - print rates table

Parameters:
  • asset – asset code
  • start – start date (for rates), default: first day of current month
  • end – end date (for rates)