biweeklybudget.ofxupdater module¶
-
exception
biweeklybudget.ofxupdater.
DuplicateFileException
[source]¶ Bases:
exceptions.Exception
Exception raised when trying to parse a file that has already been parsed for the Account (going by the OFX signon date).
-
class
biweeklybudget.ofxupdater.
OFXUpdater
(acct_id, acct_name, cat_memo=False)[source]¶ Bases:
object
Class to wrap updating the database with a parsed OFX file.
-
_create_statement
(ofx, mtime, filename)[source]¶ Create an OFXStatement for this OFX file. If one already exists with the same account and filename, raise DuplicateFileException.
Parameters: - 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: the OFXStatement object
Return type: Raises: DuplicateFileException
- ofx (
-
_update_bank_or_credit
(ofx, stmt)[source]¶ Update a single OFX file for this Bank or Credit account.
Parameters: - ofx (
ofxparse.ofxparse.Ofx
) – Ofx instance for parsed file - stmt (biweeklybudget.models.ofx_statement.OFXStatement) – the OFXStatement for this statement
Returns: the OFXStatement object
Return type: - ofx (
-
_update_investment
(ofx, stmt)[source]¶ Update a single OFX file for this Investment account.
Parameters: - ofx (
ofxparse.ofxparse.Ofx
) – Ofx instance for parsed file - stmt (biweeklybudget.models.ofx_statement.OFXStatement) – the OFXStatement for this statement
Returns: the OFXStatement object
Return type: - ofx (
-
update
(ofx, mtime=None, filename=None)[source]¶ Update a single OFX file for this account.
Parameters: - 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: the OFXStatement created by this run
Return type: - ofx (
-