budge package
- class budge.Account(name)
Bases:
objectA register of transactions and repeating transactions that can be used to calculate or forecast a balance for any point in time.
- balance(as_of=None, cleared=None)
Calculate the account balance as of the given date.
- daily_balance(start_date=None, end_date=None, cleared=None)
Iterate over the daily balance of the account, yielding tuples of date and balance.
The balance on the given start date is yielded first, and then the balance for each subsequent date is yielded. If the start date is not given, the date of the first transaction is used. If the end date is not given, today’s date is used.
- Return type:
Generator[DailyBalance,None,None]
-
name:
str
-
repeating_transactions:
Collection[RepeatingTransaction]
- running_balance(start_date=None, end_date=None, cleared=None)
Iterate over transactions in the account over the given range with a running account balance.
- Return type:
Generator[RunningBalance,None,None]
-
transactions:
Collection[Transaction]
- transactions_range(start_date=None, end_date=None, cleared=None)
Iterate over transactions in the account over the given range.
- Return type:
Generator[Transaction,None,None]
- class budge.RepeatingTransaction(description, amount, date=<factory>, account=None, parent=None, cleared=False, *, schedule, _last_cleared=None)
Bases:
TransactionA transaction that repeats on a schedule described by a dateutil.rrule.rrule or dateutil.rrule.rruleset.
- property last_cleared: date | None
-
schedule:
rrule|rruleset
- class budge.RepeatingTransfer(description, amount, date=<factory>, account=None, parent=None, cleared=False, *, schedule, _last_cleared=None, from_account, to_account)
Bases:
Transfer,RepeatingTransactionA transfer between two accounts that repeats on a schedule described by a dateutil.rrule.rrule or dateutil.rrule.rruleset.
- property last_cleared: date | None
- class budge.Transaction(description, amount, date=<factory>, account=None, parent=None, cleared=False)
Bases:
objectA single transaction record.
-
amount:
IntoMoney
-
cleared:
bool= False
-
date:
date
-
description:
str
-
parent:
Optional[Self] = None
-
amount:
- class budge.Transfer(description, amount, date=<factory>, account=None, parent=None, cleared=False, *, from_account, to_account)
Bases:
TransactionRecord of a transfer between two accounts.
-
from_account:
InitVar
-
from_transaction:
Transaction
-
to_account:
InitVar
-
to_transaction:
Transaction
-
from_account: