Skip to main content

Firefly iii Importer from YNAB 4

Project description

https://img.shields.io/pypi/v/Firefly-YNAB4-Importer.svg?style=flat-square https://img.shields.io/pypi/pyversions/Firefly-YNAB4-Importer.svg?style=flat-square https://img.shields.io/pypi/implementation/Firefly-YNAB4-Importer.svg?style=flat-square https://img.shields.io/badge/code%20style-black-000000.svg

Simple importer for moving from YNAB4 (You Need A Budget) to Firefly-iii.

What?

This tool lets you migrate your financial history from YNAB 4 (not nYNAB) to Firefly-iii with minimal manual actions. It’s written in Python and has the following features:

  • Create asset accounts, budgets, budget history, categories, revenue accounts, expense accounts.

  • Import splits accurately!

  • Automatically verifies the integrity of import by comparing Running Balance in YNAB 4 to Firefly iii

  • Foreign currency support - convert to foreign amounts in Firefly-iii seamlessly. Also gets real amounts from memo if that’s part of your YNAB workflow.

  • Idempotent imports! Ran into an error mid-import? Just run it again after correcting the problem.

  • Handle inactive budgets

  • Caches firefly data so re-runs are fast

These cases are unsupported / not on the roadmap:

  • Importing budget limits - YNAB 4’s secret sauce is the rules. One of those rules - live on last month’s income doesn’t match how Firefly budgets things. So this will require some more thought / investigation on how to set up sanely.

  • Multiple foreign currencies (rare, but possible)

Why?

YNAB 4 is (was?) a desktop software with support for sharing using external mechanisms like Dropbox or just local file sharing like Airdrop. After version 4, YNAB went online with monthly subscription, all data on the cloud and stopped supporting YNAB 4. If you don’t like your financial data on the cloud, very few alternatives exist, and Firefly is one of the solid ones.

Firefly iii gives you control over where you want to host the application - local / in your own cloud etc, provides most of the features that YNAB 4 did and then some. Reports in particular are :100:.

However, if you have historical data in YNAB 4 like I do, starting fresh means throwing away all that history. Firefly iii does support migration from nYNAB (the cloud version) natively, but not from YNAB 4. There’s also a csv importer but it misses a lot of things that this tool fixes, such as:

  1. Doesn’t import budget history.

  2. Need manual management of accounts (otherwise it gets confused about “Citi” the asset account with “Citi” the expense account).

  3. Transfers get duplicated because YNAB stores them as two transactions.

  4. Splits are a whole can of worms.

  5. No support for foreign transactions

  6. Flaky import - doesn’t really work for imports of more than 500 transactions at a time and fails intermittently.

How?

Pre-requisites:

  1. Python 3.8+

Setup:

  1. Install: pip install Firefly-YNAB4-Importer

  2. Export YNAB 4 data to local disk

  3. Setup config (see config.example.toml for documentation)

  4. Backup Firefly iii database! (IMPORTANT!)

  5. Run import:

    export FIREFLY_III_URL=<firefly url>
    export FIREFLY_III_ACCESS_TOKEN=<firefly access token>
    firefly-ynab4-importer <config file> "<register path>" "<budget path>"

    where:

    • <firefly url> is the url for your firefly installation

    • <firefly access token> is the personal access token for your user

    • <config file> is the path to config file created earlier

    • <register path> is the path to the YNAB export register file (the one named

      <budge name> as of <timestamp>-Register.csv)

    • <budget path> is the path to the YNAB export budget file (the one

      named <budge name> as of <timestamp>-Budget.csv).

    • Remember to double quote since that path contains spaces.

  6. Additional options:

    • Limit imports to certain dates (this is useful in verifying that import works fine for your use case)

      Firefly-YNAB4-Importer <config file> "<register path>" "<budget path>" "<start month>" "<end month>"

Development

Setup:

  1. Install python 3.8+ using favorite tool e.g. Pyenv.

  2. Optionally create virtualenv using your favorite method e.g. Pyenv virtualenv.

  3. Install requirements: pip install -e .[dev]

  4. Verify Firefly-YNAB4-Importer runs cleanly.

  5. Publish new version:

    python setup.py sdist bdist_wheel
    
    twine upload dist/*

Bugs

We use GitHub issues for tracking bugs and feature requests. YNAB 4 and Firefly iii are both fairly complicated software. It’s not only possible, but likely that you’ll run into issues if your setup is moderate to high level of customization.

If you find a bug, please open an issue.

Contributing

If you find this useful and want to contribute, here’s a list of feature I’d like to add -

  • Move to click + better CLI documentation

  • Investigate budget history support

  • Mark accounts as inactive automatically

  • Multiple foreign currencies (rare, but possible)

  • Command to clear cache, and move cache to appropriate directory depending on platform (e.g. ~/.cache on Unix)

  • Better error handling - guide user on how to correct problems

  • Testing

    • Set up test fixtures for inputs and expected outputs

    • Verify all the options in Config work correctly

  • Type checking - mypy checks.

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

Firefly-YNAB4-Importer-0.1.tar.gz (18.8 kB view details)

Uploaded Source

Built Distribution

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

Firefly_YNAB4_Importer-0.1-py3-none-any.whl (18.0 kB view details)

Uploaded Python 3

File details

Details for the file Firefly-YNAB4-Importer-0.1.tar.gz.

File metadata

  • Download URL: Firefly-YNAB4-Importer-0.1.tar.gz
  • Upload date:
  • Size: 18.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.48.0 CPython/3.8.2

File hashes

Hashes for Firefly-YNAB4-Importer-0.1.tar.gz
Algorithm Hash digest
SHA256 2895c15e2d860feda146fbf773a71592fe767d3e147dd472e9293363daef1e49
MD5 baeb0c478aa33f445ddf26555ad41c3a
BLAKE2b-256 aa766bc7ad55473bf1d547f7420adac4b7f2c44af4c34a42676f4bc4f9614435

See more details on using hashes here.

File details

Details for the file Firefly_YNAB4_Importer-0.1-py3-none-any.whl.

File metadata

  • Download URL: Firefly_YNAB4_Importer-0.1-py3-none-any.whl
  • Upload date:
  • Size: 18.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.48.0 CPython/3.8.2

File hashes

Hashes for Firefly_YNAB4_Importer-0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 79b949125811c02cfe6e6c7341ebf37ed384d834f356dd25aa7ebaed15a9c164
MD5 e10d377697304f1a7cf21fdfeaaf3aee
BLAKE2b-256 c82d0aa91d9da14480b46a8045e80fd7ca1bfe78659a621e75764b8325685500

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