Skip to main content

QIF Parser

https://travis-ci.org/giacomos/qifparse.png?branch=master

qifparse is a parser for Quicken interchange format files (.qif).

Even if the qif format is:

  • quite old now

  • not supported for import by Quicken any more,

  • ambiguous in some data management (notably on dates)

it’s still quite commonly used by many personal finance managers.

Usage

Here’s a sample parsing:

>>> from qifparse.parser import QifParser
>>> qif = QifParser.parse(file('file.qif'))
>>> qif.get_accounts()
(<qifparse.qif.Account object at 0x16148d0>, <qifparse.qif.Account object at 0x1614850>)
>>> qif.accounts[0].name
'My Cash'
>>> qif.get_categories()
(<qifparse.qif.Category object at 0x15b3d10>, <qifparse.qif.Category object at 0x15b3450>)
>>> qif.accounts[0].get_transactions()
(<Transaction units=-6.5>, <Transaction units=-6.0>)
>>> str(qif)
'!Type:Cat\nNfood\nE\n^\nNfood:lunch\nE\n^\n!Account\nNMy Cash\nTCash\n^\n!Type:Cash...
...

Here’s a sample of a structure creation:

>>> qif_obj = qif.Qif()
>>> acc = qif.Account(name='My Cc', account_type='Bank')
>>> qif_obj.add_account(acc)
>>> cat = qif.Category(name='food')
>>> qif_obj.add_category(cat)
>>> tr1 = qif.Transaction(amount=0.55)
>>> acc.add_transaction(tr1, header='!Type:Bank')

>>> tr2 = qif.Transaction()
>>> tr2.amount = -6.55
>>> tr2.to_account = 'Cash'
>>> acc.add_transaction(tr2)
>>> acc.add(tr2)
>>> str(qif_obj)
'!Type:Cat\nNfood\nE\n^\n!Account\nNMy Cc\nTBank\n^\n!Type:Bank\nD02/11/2013\nT...
...

More infos

For more informations about qif format:

Changelog

0.5 (2013-11-03)

  • now transactions can also be outside accounts

  • moved properties to method in order to accept filters

0.4 (2013-11-02)

  • address can be multilines

  • split can have the address attribute

  • add support for Classes

  • add support for MemorizedTransaction

0.3 (2013-11-02)

  • more refactoring, now the lib is much more simple and engineered

  • improved fields validation

0.2 (2013-11-02)

  • huge refactor, now the structure can be create and modified programmatically

0.1 (2013-11-01)

  • first release on Pypi

Metadata

Release files for qifparse 0.5

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

Source distribution (sdist)

Source distribution for qifparse 0.5
File Size Uploaded Provenance Actions
qifparse-0.5.tar.gz 8.7 kB Without provenance Details for qifparse-0.5.tar.gz

Release files / qifparse-0.5.tar.gz

Download URL qifparse-0.5.tar.gz
Size 8.7 kB
Tags Source
SHA-256 checksum
How to use checksums
550423ac8a4714eccbb11ad53d3ccb6d99ee974813816dc5373837b75bf289ad
BLAKE2b-256 checksum
How to use checksums
ccfce14d09401c247d4c3584ee2ee2ff31e4d72590d9b110f637fa4a6d6b7586
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Security for qifparse 0.5

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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