Skip to main content

Import your ING Germany bank statements via FinTS into YNAB

Project description

ing-ynab logo

ci PyPI PyPI - Python Version PyPI - License

Import your ING Germany bank statements via FinTS into YNAB.

Setup

Before setting this up, please register your FinTS product – it's free and takes only a few days.
If you don't do this, the application will fallback to the product id from the python-fints library, which should only be used for evaluation.

Since this application will need your ING pin and YNAB access token it's recommended to run this in your local network (could be a Raspberry Pi, it's pretty light).

The application writes the last date and a hash of the last imported transaction to a state file. If you use it in a container be sure to mount it to prevent duplicates.

There are various ways to start the application:

Local

This can be run on any environment with Python 3.8 or higher.

$ python3 -m pip install ing-ynab
$ touch .env # see configuration section
$ ing-ynab

Docker

$ cp .env.example .env # and customize fields
$ docker run \
    -v $PWD/ing_ynab_state:/app/state \
    --env-file .env \
    docker.pkg.github.com/bahlo/ing-ynab/ing-ynab:1.2.0

docker-compose

version: "2.0"

services:
  ing-ynab:
    image: docker.pkg.github.com/bahlo/ing-ynab/ing-ynab:1.2.0
    volumes:
      - ${PWD}/ing_ynab_state:/app/state
    environment:
      # Environment variables, see the configuration section

Configuration

The configuration is done via environment variables:

  • START_DATE: The date to start getting transactions (defaults to today).
  • SLEEP_INTERVAL: Interval in seconds until the next check happens (defaults to 5 minutes).
  • FINTS_PRODUCT_ID: Your FinTS product ID (deafults to python-fints one).
  • ING_LOGIN: The login id of your ING account.
  • ING_IBAN: The IBAN of the account you want to add.
  • ING_PIN: The pin of your ING account (leave empty to be prompted).
  • YNAB_ACCESS_TOKEN: Go to your budget settings to create one (leave empty to be prompted).
  • YNAB_BUDGET_ID: On the webpage of your budget the last number in the path.
  • YNAB_ACCOUNT_ID: On the webpage of the account the last uuid in the path.
  • YNAB_FLAG_COLOR: If set, use that color for the imported transactions.
  • DEBUG: Set to 1 to enable debug output and print transactions instead of importing them.

Security

You can pass in your bank pin and YNAB access token via environment variables, if you like. This has the drawback that anyone with system access can read and potentially use them so it's discouraged (but supported).

The alternative is not specifying YNAB_ACCESS_TOKEN and/or ING_PIN, which will cause the application to prompt you on startup. This has the drawback that you need to input them everytime the application restarts.

For docker you'll need to pass the -it flags to be able to input these variables. For docker-compose, add these fields:

  tty: true
  stdin_open: true

After starting with docker-compose up -d, run docker attach $container_id to attach to the container. Note that the prompt for the pin might be hidden, so you have to enter the pin directly.

FAQ

Why is this ING-only? Isn't FinTS a general protocol?

It is, but the implementations differ a lot. This actually started out as a general-purpose library but I can only really test ING and I rather have a specialised library than a multipurpose one where I can't guarantee functionality.

Can you support my bank?

The python-fints library supports a lot of banks, so probably. But we need to work together as I can't test it. Feel free to get in touch: hallo@arne.me

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

ing-ynab-1.2.0.tar.gz (8.8 kB view details)

Uploaded Source

Built Distribution

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

ing_ynab-1.2.0-py3-none-any.whl (9.2 kB view details)

Uploaded Python 3

File details

Details for the file ing-ynab-1.2.0.tar.gz.

File metadata

  • Download URL: ing-ynab-1.2.0.tar.gz
  • Upload date:
  • Size: 8.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.3.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.0 CPython/3.9.5

File hashes

Hashes for ing-ynab-1.2.0.tar.gz
Algorithm Hash digest
SHA256 f4530b911574e9c24b37eafea430944d29416cf5a53e622a42f1b687d218472e
MD5 0bfbb5f4c5b09b301fc55f11a1356fcb
BLAKE2b-256 dff04c3539e99ae69e0c1f05b26f24b81d81de8cdc36267ac3f0144c60aadf40

See more details on using hashes here.

File details

Details for the file ing_ynab-1.2.0-py3-none-any.whl.

File metadata

  • Download URL: ing_ynab-1.2.0-py3-none-any.whl
  • Upload date:
  • Size: 9.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.3.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.0 CPython/3.9.5

File hashes

Hashes for ing_ynab-1.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 8bb09da8cb510cf1f5e89c53bce454dbc0eb536cc7892b52a5ba897a1f6d333d
MD5 e708acce0ba03a96147f617daf474c01
BLAKE2b-256 e0912b8fbc04381a3dd67a9f3a3eb12210182550312ca840273c4e25df6e3809

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page