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:
objectRemote OFX API client, used by ofxgetter/ofxbackfiller when running on a remote system.
-
get_accounts()[source]¶ Query the database for all
ofxgetter-enabledAccountsthat have a non-emptybiweeklybudget.models.account.Account.ofxgetter_configand a non-Nonebiweeklybudget.models.account.Account.vault_creds_path. Return a dict of stringAccount nameto dict with keys:vault_path-vault_creds_pathconfig-ofxgetter_configid-idcat_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
OFXStatementcreated by this run, int count of newOFXTransactioncreated, and int count ofOFXTransactionupdatedReturn type: Raises: RuntimeErroron error parsing OFX or unknown account type;DuplicateFileExceptionif the file (according to the OFX signon date/time) has already been recorded.
-