Giter Site home page Giter Site logo

ing-ynab's Introduction

⚠️ Unmaintained. YNAB now supports linking your ING Account directly in their app.


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).

There are various ways to start the application:

Local

This can be run on any environment with Python 3.7 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 --env-file .env docker.pkg.github.com/bahlo/ing-ynab/ing-ynab:2.0.2

docker-compose

version: "2.0"

services:
  ing-ynab:
    image: docker.pkg.github.com/bahlo/ing-ynab/ing-ynab:2.0.2
    environment:
      # Environment variables, see the configuration section

Configuration

The configuration is done via environment variables:

  • SLEEP_INTERVAL_SECONDS: 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 first UUID in the path (https://app.youneedabudget.com/<BUDGET_UUID>/budget/202109).
  • YNAB_ACCOUNT_ID: On the webpage of the bank account the last UUID in the path (https://app.youneedabudget.com/<BUDGET_UUID>/accounts/<BANK_ACCOUNT_UUID>).
  • 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: [email protected]

How do I register the FinTS product?

  1. Go to the FinTS product registration
  2. Click Registrierungsprozess to get to a PDF form
  3. Fill in your data. If you don't know what else to put, here are some suggestions:
    • Firmenbezeichnung: Your name
    • Produktname: ing-ynab
    • Produktkategorie: Web-Server
  4. Send the form to the email adress on the last page

After a week or two you will get your product id via email.

ing-ynab's People

Contributors

bahlo avatar dependabot[bot] avatar lukasmalkmus avatar mkerix avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

ing-ynab's Issues

Mark added transactions as "imported"

I'm a big fan of YNAB's model for entering transactions manually at first and then matching them against bank transactions as they roll in, like they have it for their official bank import feature. According to their docs you can also achieve this via the API. For that the import_id should be set for each transaction, ideally following a format convention they describe.

I think that this would add nice value to this project. I'm also willing to try implementing this once I have received my FinTS registration.

Improve FinTS registration docs

Hey Arne, I would love to use this, but honestly I have no idea how to register my "FinTS product".
I have trouble identifying what information is needed in order to register the product (what "product" are we even talking about here?).

Would Firmenbezeichnung be your name and Produktname be ing-ynab? Maybe we can improve the README? I feel pretty dumb and lost here...

Thanks!

fints.exceptions.FinTSDialogInitError

I sometimes get this error:

Unexpected error: <class 'fints.exceptions.FinTSDialogInitError'>

When I do, it occurs on every run afterwards. We should either abort the program or reinitialise the FinTS client (I'd prefer the latter).

Remove state

With #121 we don't need the state file anymore because YNAB will detect duplicates for us. However most people will set the START_DATE once and never again, which will lead to fetching more and more transactions (and probably break at some time).

Instead we should either have a window (i.e. set START_DATE to 30 days ago if it's older) or get the last transaction date from YNAB (this might be the cleanest).

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.