captin411 / ofxclient

Bank transaction downloader and python OFX client libraries
MIT License
262 stars 89 forks source link

writing ofxclient.ini to sqlite db? #5

Open ansother opened 10 years ago

ansother commented 10 years ago

Is it possible to write the ofxclient.ini to a sqlite db?

Thanks,

Andrew

captin411 commented 8 years ago

There is no way to do this easily as I didn't design the config storage and loading to be pluggable.

If you would like to store information in an sqlite DB you could roll your own; There is nothing keeping you from using the ofxclient.Account, ofxclient.Institution, ofxclient.Client classes directly.

Basically you would be writing:

The low level way you would connect to american express for example:

from ofxclient import Institution

# these pieces of information you have to sort of just discover.  I like to look these things up on
# http://ofxhome.com -- a site that has a large list of banks and their URLs
inst = Institution(
          id       = '3101',
          org      = 'AMEX',
          url      = 'https://online.americanexpress.com/myca/ofxdl/desktop/desktopDownload.do?request_type=nl_ofxdownload',
          username = 'gene',
          password = 'wilder'
)

for a in inst.accounts():
    print a.statement(days=5).balance