A(nother) Python-based Parser for Quicken / Lexware Finance Manager QIF files.
Project description
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
-
https://github.com/jemmyw/Qif/blob/master/QIF_references for a QIF reference
-
Quicken may differ with respect to their content, as Quicken allows to include or exclude categories, classes, etc.
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 ^
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pyqifparser-0.61.0.tar.gz.
File metadata
- Download URL: pyqifparser-0.61.0.tar.gz
- Upload date:
- Size: 7.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4a651d6655921c3fb17d882f074176e14cb083f0542b284da784635127e7aa1e
|
|
| MD5 |
540c2ef814e4c9ec639ed839a7725945
|
|
| BLAKE2b-256 |
e56b5a594e085878f04cca8b2e1c50999f3d2f5e9de1189de30b2bece7f321a5
|
File details
Details for the file pyqifparser-0.61.0-py3-none-any.whl.
File metadata
- Download URL: pyqifparser-0.61.0-py3-none-any.whl
- Upload date:
- Size: 7.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e03c14f516fab6a85ba7eaf99b999f0217ebf3e2a4565ceefa0d7b72a72bc116
|
|
| MD5 |
460f7afd53546ed0e6504392b7dbecb1
|
|
| BLAKE2b-256 |
ac49b7b6bc82989b0e89cdc7634f57922dad5f2f5f8fbf00c49e7e52e11561bc
|