Skip to main content

fints2ledger

Build Status Coverage Status PyPI version languages

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

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.

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

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

fints2ledger-0.5.0.tar.gz (7.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

fints2ledger-0.5.0-py3-none-any.whl (10.8 kB view details)

Uploaded Python 3

File details

Details for the file fints2ledger-0.5.0.tar.gz.

File metadata

  • Download URL: fints2ledger-0.5.0.tar.gz
  • Upload date:
  • Size: 7.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.4.2 requests/2.18.4 setuptools/41.2.0 requests-toolbelt/0.8.0 tqdm/4.23.0 CPython/3.6.8

File hashes

Hashes for fints2ledger-0.5.0.tar.gz
Algorithm Hash digest
SHA256 ddaaf59b1a21251650818500b8a6a5d321ed710c64b670723b1cd12d9fea975d
MD5 0bd1c73b5b033c0b5983d98b53d2aa87
BLAKE2b-256 df3d1322d32b1d6672a866d5a0fd67db3467857c2403601c0919fdb946f08f38

See more details on using hashes here.

File details

Details for the file fints2ledger-0.5.0-py3-none-any.whl.

File metadata

  • Download URL: fints2ledger-0.5.0-py3-none-any.whl
  • Upload date:
  • Size: 10.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.4.2 requests/2.18.4 setuptools/41.2.0 requests-toolbelt/0.8.0 tqdm/4.23.0 CPython/3.6.8

File hashes

Hashes for fints2ledger-0.5.0-py3-none-any.whl
Algorithm Hash digest
SHA256 6e888c354f5a204cdfb60cdd7a51d4354f30263b2c9f06218d0e05f10770bec7
MD5 eaefd06d8e52dc1ff6f26edc6d61912c
BLAKE2b-256 f50eca4199222184ae37b990b0e3d9014765d0135a00bff255a8d12e206c4c23

See more details on using hashes here.

Release history Release notifications | RSS feed

0.8.2

2 files

0.8.1

2 files

0.8.0

2 files

0.7.0

2 files

0.6.2

2 files

0.6.1

2 files

0.6.0

2 files

0.5.5

2 files

0.5.4

2 files

0.5.3

2 files

0.5.2

2 files

0.5.1

2 files

This release

0.5.0 This release

2 files

0.4.4

2 files

0.4.3

2 files

0.4.2

2 files

0.4

2 files

0.3

2 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