biweeklybudget.models.account module¶
-
class
biweeklybudget.models.account.
Account
(**kwargs)[source]¶ Bases:
sqlalchemy.ext.declarative.api.Base
,biweeklybudget.models.base.ModelAsDict
-
_sa_class_manager
= <ClassManager of <class 'biweeklybudget.models.account.Account'> at 7f5182f8fab8>¶
-
all_statements
¶ Relationship to all
OFXStatement
for this Account
-
balance
¶ Return the latest AccountBalance object for this Account.
Returns: latest AccountBalance for this Account Return type: biweeklybudget.models.account_balance.AccountBalance
-
credit_limit
¶ credit limit, for credit accounts
-
description
¶ description
-
for_ofxgetter
¶ Return whether or not this account should be handled by ofxgetter.
Returns: whether or not ofxgetter should run for this account Return type: bool
-
id
¶ Primary Key
-
is_active
¶ whether or not the account is active and can be used, or historical
-
is_budget_source
¶ Return whether or not this account should be considered a funding source for Budgets.
Returns: whether or not this account is a Budget funding source Return type: bool
-
is_stale
¶ Return whether or not there is stale data for this account.
Returns: whether or not data for this account is stale Return type: bool
-
name
¶ name for the account
-
negate_ofx_amounts
¶ For use in reconciling our
Transaction
entries with the account’sOFXTransaction
entries, whether or not to negate the OfxTransaction amount. We enter Transactions with income as negative amounts and expenses as positive amounts, but most bank OFX statements will show the opposite.
-
ofx_cat_memo_to_name
¶ whether or not to concatenate the OFX memo text onto the OFX name text; for banks like Chase that use the memo for run-on from the name
-
ofx_statement
¶ Return the latest OFXStatement for this Account.
Returns: latest OFXStatement for this Account Return type: biweeklybudget.models.ofx_statement.OFXStatement
-
ofxgetter_config
¶ Return the deserialized ofxgetter_config_json dict.
Returns: ofxgetter config Return type: dict
-
ofxgetter_config_json
¶ JSON-encoded ofxgetter configuration
-
re_fee
¶ regex for matching transactions as fees
-
re_interest_charge
¶ regex for matching transactions as interest charges
-
re_interest_paid
¶ regex for matching transactions as interest paid
-
re_payment
¶ regex for matching transactions as payments
-
reconcile_trans
¶ Include Transactions and OFXTransactions from this account when reconciling. Set to False to exclude accounts that are investment, payment only, or otherwise won’t have a matching Transaction for each OFXTransaction.
-
set_balance
(**kwargs)[source]¶ Create an AccountBalance object for this account and associate it with the account. Add it to the current session.
-
set_ofxgetter_config
(config)[source]¶ Set ofxgetter configuration.
Parameters: config (dict) – ofxgetter configuration
-
unreconciled
¶ Return a query to match all unreconciled Transactions for this account.
Parameters: db (sqlalchemy.orm.session.Session) – active database session to use for queries Returns: query to match all unreconciled Transactions Return type: sqlalchemy.orm.query.Query
-
unreconciled_sum
¶ Return the sum of all unreconciled transaction amounts for this account.
Returns: sum of amounts of all unreconciled transactions Return type: float
-
vault_creds_path
¶ path in Vault to read the credentials from
-
-
class
biweeklybudget.models.account.
AcctType
[source]¶ Bases:
enum.Enum
-
Bank
= 1¶
-
Cash
= 4¶
-
Credit
= 2¶
-
Investment
= 3¶
-
Other
= 5¶
-
_member_map_
= OrderedDict([('Bank', <AcctType.Bank: 1>), ('Credit', <AcctType.Credit: 2>), ('Investment', <AcctType.Investment: 3>), ('Cash', <AcctType.Cash: 4>), ('Other', <AcctType.Other: 5>)])¶
-
_member_names_
= ['Bank', 'Credit', 'Investment', 'Cash', 'Other']¶
-
_value2member_map_
= {1: <AcctType.Bank: 1>, 2: <AcctType.Credit: 2>, 3: <AcctType.Investment: 3>, 4: <AcctType.Cash: 4>, 5: <AcctType.Other: 5>}¶
-
as_dict
¶
-