biweeklybudget.ofxgetter module

class biweeklybudget.ofxgetter.OfxGetter(savedir='./')[source]

Bases: object

_get_ofx_scraper(account_name, days=30)[source]

Get OFX via a ScreenScraper subclass.

Parameters:
  • account_name (str) – account name
  • days (int) – number of days of data to download
Returns:

OFX string

Return type:

str

_ofx_to_db(account_name, fname, ofxdata)[source]

Put OFX Data to the DB

Parameters:
  • account_name (str) – account name to download
  • ofxdata (str) – raw OFX data
  • fname (str) – filename OFX was written to
_write_ofx_file(account_name, ofxdata)[source]

Write OFX data to a file.

Parameters:
  • account_name (str) – account name
  • ofxdata (str) – raw OFX data string
Returns:

name of the file that was written

Return type:

str

static accounts()[source]

Return a sorted list of all Account objects that are for ofxgetter.

get_ofx(account_name, write_to_file=True, days=30)[source]

Download OFX from the specified account. Return it as a string.

Parameters:
  • account_name (str) – account name to download
  • write_to_file (bool) – if True, also write to a file named “<account_name>_<date stamp>.ofx”
  • days (int) – number of days of data to download
Returns:

OFX string

Return type:

str

biweeklybudget.ofxgetter.main()[source]
biweeklybudget.ofxgetter.parse_args()[source]