Skip to content

hhessel/PyQIF-Parser

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

34 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PyQIF-Parser

A(nother) Python-based Parser for Quicken / Lexware Finance Manager QIF files.

Why

There are already some Python-based parsers for QIF files, however they had issues with the file my (German) Lexware Financial Manager (Finanzmanager) 2021 is spitting out.

What I basically need is a tool to convert a QIF file into a pandas dataframe, so this is my main motivation.

As I do not use split bookings I probably will not spend some effort to implement them. Feel free to send a pull request.

Contributions

All work done by Uwe Ziegenhagen. I did just repackage the code with some slight changes for my own purposes and so it's available as https://pypi.org/project/PyQifParser/ package.

Resources

In the file I used to build the parser there were:

  • an option to indicate the date format (here: "MDY")
  • The classes
  • The categories
  • The accounts
  • The bookings

How install

pip install PyQifParser

Proof of Concept

I hacked together a proof of concept, see it here: https://gist.github.com/UweZiegenhagen/08885a0c08a6f23bd2c3855106a1522c

This code is quite ugly but parses my QIF file w/o errors, so it will be the basis for this project.

It works by checking each line and triggering a mode change when certain keywords are found.

Let's see an example. Imagine, we find !Type:Class in the QIF file. This indicates that the next lines (up to the next !Type:XXXX) contain the classes, which are formed by an N-Tag, followed by D-tag, followed by the circumflex.

!Type:Class NHouse DSpendings for the house ^

About

A Python-based Parser for Quicken / Lexware Finance Manager QIF files

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 99.9%
  • Batchfile 0.1%