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.


Query the database for all ofxgetter-enabled Accounts that have a non-empty biweeklybudget.models.account.Account.ofxgetter_config and a non-None biweeklybudget.models.account.Account.vault_creds_path. Return a dict of string Account name to dict with keys:

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.

  • 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

3-tuple of the int ID of the OFXStatement created by this run, int count of new OFXTransaction created, and int count of OFXTransaction updated

Return type:



RuntimeError on error parsing OFX or unknown account type; DuplicateFileException if the file (according to the OFX signon date/time) has already been recorded.