fints2ledger
A tool for downloading transactions from FinTS banking APIs and sorting them into a ledger journal.
pyfints is used to download the transactions. A list of compatible banks can be found there. This tool was tested with ing-diba only.
Install
pip install fints2ledger
Create config file at ~/.config/fints2ledger/config.yml file with the following contents and replace values in the fints category:
(This file will also be automatically created if missing)
fints:
blz: "<your bank's BLZ>"
account: "<your account number>"
password: "<your banking password>"
endpoint: <your bank fints endpoint> # e.g.: https://fints.ing-diba.de/fints/ for ING-Diba
selectedAccount: "<account number>" # defaults to the value from "account", useful when you have multiple accounts for the same login
ledger:
prompts:
- credit_account
- debit_account
autocomplete:
accounts:
- credit_account
- debit_account
defaults:
debit_account: assets:bank:checking
md5:
- date
- payee
- purpose
- amount
Usage
Run
fints2ledger
This will download the transactions from the last year and tries to convert them to a ledger journal.
You can enter s on any transaction prompt to skip the transaction and return to it on the next run.
A list of available command line arguments:
usage: fints2ledger [-h] [--no-csv] [--no-ledger] [--csv-file CSVFILE]
[--ledger-file LEDGERFILE] [--files-path FILES_PATH]
[--date START] [--separator SEPARATOR]
Converting transactions from fints apis to ledger.
optional arguments:
-h, --help show this help message and exit
--no-csv exclude conversion from fints to csv (default: not
excluded)
--no-ledger exclude conversion from csv to ledger (default: not
excluded)
--csv-file CSVFILE file to store/load csv transactions to/from (default:
transactions.csv)
--ledger-file LEDGERFILE
file to store ledger entries to (default:
ledger.journal)
--files-path FILES_PATH
directory to store fints2ledger files (like
config.yml) (default: ~/.config/fints2ledger/)
--date START start date to pull the FinTS entires from (fromat:
2017/12/31 or 17/12/31, default: last year)
--separator SEPARATOR
character used as separator in csv file (default: ;)
Template File
A template file with the name template.txt will be automaticall generated. It will be user to create the ledger entries.
It looks something like
{date} {payee} {posting} {purpose}
; md5sum: {md5sum}
{debit_account:<60} {currency} {debit}
{credit_account:<60} {currency} {credit}
Each name inside curly brackets can specify a value that can come from either a named csv column, a default value (from the config.yml) or an input prompt (also from the config.yml).
Converting from csv to ledger without requesting a FinTS API
With the argument --no-csv the program will not create a csv file with banking transactions itself (default ist fints -> csv -> ledger).
Instead, it will convert directly from a csv file to ledger. This is useful when all transactions have already been downloaded or when converting from another source than FinTS to ledger.
The csv file must provide a headline which names the columns. The column names are then used to fill the values in the template file. Example:
date;amount;currency;payee;posting;purpose
2017/04/26;167.31;EUR;Billy, Bill;bonus;for vacation
2017/04/27;-130;EUR;John, Smith;debit entry;monthly electricity payment
Metadata
Release files for fints2ledger 0.5.5
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| fints2ledger-0.5.5.tar.gz | 7.7 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| fints2ledger-0.5.5-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 18.7 kB
Release files / fints2ledger-0.5.5.tar.gz
| Download URL | fints2ledger-0.5.5.tar.gz |
|---|---|
| Size | 7.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
75658b1f8ae77b2ad8856bf89fa9d211a690444a2950cf4b723cb1a203e976a9
|
|
BLAKE2b-256 checksum How to use checksums |
98e38579c9be98fe6a8621180c28345333f1653413646a0d99e21e1c1f8eea5b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.4.2 requests/2.22.0 setuptools/45.2.0 requests-toolbelt/0.8.0 tqdm/4.23.0 CPython/3.6.9
|
Release files / fints2ledger-0.5.5-py3-none-any.whl
| Download URL | fints2ledger-0.5.5-py3-none-any.whl |
|---|---|
| Size | 11.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
5b3dcb6610387ef5cbed4ca8a54e2db697de908ad4b6c66f8372c4e25cbcd963
|
|
BLAKE2b-256 checksum How to use checksums |
c71010d4e2bf333ff7278b8c1bbcc03cea94def79cb61b31d1a91cb7aae2f777
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.4.2 requests/2.22.0 setuptools/45.2.0 requests-toolbelt/0.8.0 tqdm/4.23.0 CPython/3.6.9
|