Skip to main content

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

# pip for Python 3: pip install BeautifulSoup4 six lxml nose coverage

# pip for Python 2: pip install BeautifulSoup six nose coverage

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.

Metadata

Release files for ofxparse 0.15

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for ofxparse 0.15
File Size Uploaded
ofxparse-0.15.tar.gz 46.5 kB Details

Built distributions (wheels)

Table of built distributions (wheels) for ofxparse 0.15
File Interpreter ABI Platform
ofxparse-0.15-py3.5.egg Legacy Egg format - - Details
ofxparse-0.15-py2.7.egg Legacy Egg format - - Details

Total release size: 191.7 kB

Release files / ofxparse-0.15.tar.gz

Download URL ofxparse-0.15.tar.gz
Size 46.5 kB
Tags Source
SHA-256 checksum
How to use checksums
623d199ca11e2713d612fb730577bb8339861affd0c02b50865ebc58c4a0dc08
BLAKE2b-256 checksum
How to use checksums
27eed0c5fb9a7082b92afa8ac35d4ff513d7700b1257366d250aab938b1af3a6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / ofxparse-0.15-py3.5.egg

Download URL ofxparse-0.15-py3.5.egg
Size 72.4 kB
Tags Egg
SHA-256 checksum
How to use checksums
97d249a9b5a8c36e90829228da3026122f0ccc76157bdae231b68d175aeb4981
BLAKE2b-256 checksum
How to use checksums
a8a40fb8b4dd60aab167dbe2dbeb41267c1d61ca00ae64c9e457bbea2ed10644
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / ofxparse-0.15-py2.7.egg

Download URL ofxparse-0.15-py2.7.egg
Size 72.8 kB
Tags Egg
SHA-256 checksum
How to use checksums
453513f2f1b16941401903a9f42ad0735cc275875e721e28ae551f664dff71f8
BLAKE2b-256 checksum
How to use checksums
bfbee6a2034b61349a069d51b37b8b47493428b19a9b71965c8720385a9e42be
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

0.21

1 release file

0.20

3 release files

0.19

3 release files

0.18

3 release files

0.17

2 release files

0.16

1 release file

This release

0.15 This release

3 release files

0.14

3 release files

0.13

3 release files

0.12

3 release files

0.11

2 release files

0.10

2 release files

0.9

2 release files

0.8

5 release files

0.7

4 release files

0.6

5 release files

0.5

5 release files

0.4

5 release files

0.3

4 release files

0.2

4 release files

0.1

4 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page