Reconciler for YNAB - Reconcile YNAB transactions to reach a target balance
This project has been archived.
The maintainers of this project have marked this project as archived. No new releases are expected.
Project description
reconciler-for-ynab
Reconcile for YNAB - Reconcile YNAB transactions from the CLI
What This Does
When YNAB imports your transactions and balances in sync, reconciliation is a simple one-click process. But sometimes there’s a mismatch, and hunting it down is tedious. I was frustrated with going line-by-line through records to find which transactions should be cleared and reconciled, so I wrote this tool. It streamlines the process by finding which transactions should be reconciled to match a target balance. It will either output the transactions to reconcile, or reconcile them automatically through the YNAB API.
Suppose I want to automatically reconcile my credit card ending in 1234 to $1,471.32. I can do that as follows:
$ reconciler-for-ynab --reconcile --account-name-regex 'credit.+1234' --target 1471.32
** Refreshing SQLite DB **
Fetching plan data...
Plans: 100%|█████████████████████████████████████████████████████████████| 10/10 [00:00<00:00, 52.24it/s]
Done
Inserting plan data...
Payees: 100%|████████████████████████████████████████████████████████████| 7/7 [00:00<00:00, 2252.93it/s]
Transactions: 100%|███████████████████████████████████████████████████| 14/14 [00:00<00:00, 10605.07it/s]
Done
** Done **
[Credit Card]: Testing combinations: 100%|██████████████████████████| 32/32 [00:00<00:00, 1065220.06it/s]
[Credit Card] Match found:
[Credit Card] * $3.04 - Starbucks
[Credit Card] * $45.14 - Caffe Panna
[Credit Card] Reconciling: 100%|███████████████████████████████████████████| 2/2 [00:00<00:00, 11.76it/s]
[Credit Card] Done
Installation
$ pip install reconciler-for-ynab
Usage
Token
Provision a YNAB Personal Access Token and save it as an environment variable.
$ export YNAB_PERSONAL_ACCESS_TOKEN="..."
Quickstart
Run the tool from the terminal to print out the transactions:
$ reconciler-for-ynab --account-name-regex 1234 --target 500.30
Run it again with --reconcile to reconcile the account.
$ reconciler-for-ynab --account-name-regex 1234 --target 500.30 --reconcile
You can set --mode to batch to process multiple accounts at once:
$ reconciler-for-ynab --reconcile --mode batch --account-target-pairs 'Checking=500' 'Credit=290'
[Checking]: Testing combinations: 100%|████████████████████████| 32/32 [00:00<00:00, 800000.00it/s]
[Checking] Match found:
[Checking] * $10.00 - Payee
[Checking] * $20.00 - Payee
[Checking] Reconciling: 100%|████████████████████████████████████████| 2/2 [00:00<00:00, 20.00it/s]
[Checking] Done
[Credit Card]: Testing combinations: 100%|█████████████████████| 32/32 [00:00<00:00, 800000.00it/s]
[Credit Card] Match found:
[Credit Card] * $10.00 - Payee
[Credit Card] * $20.00 - Payee
[Credit Card] Reconciling: 100%|█████████████████████████████████████| 2/2 [00:00<00:00, 20.00it/s]
[Credit Card] Done
Batch reconciling done.
All Options
$ reconcile-for-ynab --help
usage: reconciler-for-ynab [-h] [--mode {single,batch}] [--account-name-regex ACCOUNT_NAME_REGEX]
[--target TARGET]
[--account-target-pairs ACCOUNT_TARGET_PAIRS [ACCOUNT_TARGET_PAIRS ...]]
[--reconcile] [--sqlite-export-for-ynab-db SQLITE_EXPORT_FOR_YNAB_DB]
[--sqlite-export-for-ynab-full-refresh] [--version]
options:
-h, --help show this help message and exit
--mode {single,batch}
Reconciliation mode. `single` uses --account-name-regex/--target. `batch`
uses --account-target-pairs.
--account-name-regex ACCOUNT_NAME_REGEX
Regex to match account name (must match exactly one account)
--target TARGET Target balance to match towards for reconciliation
--account-target-pairs ACCOUNT_TARGET_PAIRS [ACCOUNT_TARGET_PAIRS ...]
Batch mode only. Account regex/target pairs in `ACCOUNT_NAME_REGEX=TARGET`
format (example: `Checking=500.30`).
--reconcile Whether to actually perform the reconciliation - if unset, this tool only
prints the transactions that would be reconciled
--sqlite-export-for-ynab-db SQLITE_EXPORT_FOR_YNAB_DB
Path to sqlite-export-for-ynab SQLite DB file (respects sqlite-export-for-
ynab configuration)
--sqlite-export-for-ynab-full-refresh
Whether to **DROP ALL TABLES** and fetch all plan data again. If unset,
this tool only does an incremental refresh
--version show program's version number and exit
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file reconciler_for_ynab-1.0.0.tar.gz.
File metadata
- Download URL: reconciler_for_ynab-1.0.0.tar.gz
- Upload date:
- Size: 12.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
798fd5e1fb93c7d0f4dd9cb0ce947fc5a510d116bb0e307cfdbc2d3936bafcc0
|
|
| MD5 |
b2f686d3fe75c075138ec9aae7511d24
|
|
| BLAKE2b-256 |
310d87d76e9cf7d512e279b172ce443fea95abb35359445a5bdbe01d34a9a0bb
|
File details
Details for the file reconciler_for_ynab-1.0.0-py2.py3-none-any.whl.
File metadata
- Download URL: reconciler_for_ynab-1.0.0-py2.py3-none-any.whl
- Upload date:
- Size: 12.0 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9fe8b31e6877994a6adede71cac1a737209729c4c69d2b005b45f4a903ecf46f
|
|
| MD5 |
81efe9e3d7cddbde4e1cc2fb555e1489
|
|
| BLAKE2b-256 |
abb97371155498d3d9dd8b612976514ad26a174b2aae512d4ed9ed2b6f54232b
|