GithubHelp home page GithubHelp logo

avorio / ofxparse Goto Github PK

View Code? Open in Web Editor NEW

This project forked from jseutter/ofxparse

0.0 1.0 0.0 377 KB

Ofx file format parser for Python

Home Page: http://sites.google.com/site/ofxparse/

License: MIT License

Python 100.00%

ofxparse's Introduction

ofxparse

ofxparse is a parser for Open Financial Exchange (.ofx) format files. OFX files are available from almost any online banking site, so they work well if you want to pull together your finances from multiple sources. Online trading accounts also provide account statements in OFX files.

There are three different types of OFX files, called BankAccount, CreditAccount and InvestmentAccount files. This library has been tested with real-world samples of all three types. If you find a file that does not work with this library, please consider contributing the file so ofxparse can be improved. See the Help! section below for directions on how to do this.

Example Usage

Here's a sample program

from ofxparse import OfxParser
with codecs.open('file.ofx') as fileobj:
    ofx = OfxParser.parse(fileobj)
ofx.accounts                        # An account with information
ofx.account.number                  # The account number
ofx.account.routing_number          # The transit id (sometimes called branch number)
ofx.account.statement               # Account information for a period of time
ofx.account.statement.start_date    # The start date of the transactions
ofx.account.statement.end_date      # The end date of the transactions
ofx.account.statement.transactions  # A list of account activities
ofx.account.statement.balance       # The money in the account as of the statement date
ofx.account.statement.available_balance # The money available from the account as of the statement date

Help!

Sample .ofx and .qfx files are very useful. If you want to help us out, please edit all identifying information from the file and then email it to jseutter dot ofxparse at gmail dot com.

Development

Prerequisites::
# Ubuntu sudo apt-get install python-beautifulsoup python-nose python-coverage-test-runner # Python 3 (pip) pip install BeautifulSoup4 six lxml nose coverage # Python 2 (pip) pip install BeautifulSoup six nose coverage

The six package is required for python 2.X compatibility

Tests: Simply running the nosetests command should run the tests.

nosetests

If you don't have nose installed, the following might also work:

python -m unittest tests.test_parse

Test Coverage Report:

coverage run -m unittest tests.test_parse

# text report
coverage report

# html report
coverage html
firefox htmlcov/index.html

Homepage

License

ofxparse is released under an MIT license. See the LICENSE file for the actual license text. The basic idea is that if you can use Python to do what you are doing, you can also use this library.

ofxparse's People

Contributors

absoludity avatar achiang avatar afnarel avatar captin411 avatar danc86 avatar egh avatar ericmoritz avatar greedo avatar guyrt avatar iffy avatar jantman avatar jaraco avatar josephw avatar jseutter avatar malikoth avatar mikeivanov avatar natebragg avatar nathangrigg avatar nix avatar orangain avatar raninho avatar rkhwaja avatar santagada avatar takis avatar themoriarty avatar tonnydourado avatar tuzzeg avatar udibr avatar westurner avatar zenbot avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.