biweeklybudget.ofxapi.remote module¶
-
class
biweeklybudget.ofxapi.remote.
OfxApiRemote
(api_base_url, ca_bundle=None, client_cert_path=None, client_key_path=None)[source]¶ Bases:
object
Remote OFX API client, used by ofxgetter/ofxbackfiller when running on a remote system.
-
get_accounts
()[source]¶ Query the database for all
ofxgetter-enabled
Accounts
that have a non-emptybiweeklybudget.models.account.Account.ofxgetter_config
and a non-Nonebiweeklybudget.models.account.Account.vault_creds_path
. Return a dict of stringAccount name
to dict with keys:vault_path
-vault_creds_path
config
-ofxgetter_config
id
-id
cat_memo
-ofx_cat_memo_to_name
Returns: dict of account names to configuration Return type: dict
-
update_statement_ofx
(acct_id, ofx, mtime=None, filename=None)[source]¶ Update a single statement for the specified account, from an OFX file.
Parameters: - acct_id (int) – Account ID that statement is for
- ofx (
ofxparse.ofxparse.Ofx
) – Ofx instance for parsed file - mtime (datetime.datetime) – OFX file modification time (or current time)
- filename (str) – OFX file name
Returns: 3-tuple of the int ID of the
OFXStatement
created by this run, int count of newOFXTransaction
created, and int count ofOFXTransaction
updatedReturn type: Raises: RuntimeError
on error parsing OFX or unknown account type;DuplicateFileException
if the file (according to the OFX signon date/time) has already been recorded.
-