Skip to main content

Money tracking tools

Project description

dinero

Tools and scripts to manage my personal finances. Your own Mint/YNAB, self hosted.

  • Plaid for collecting transactions from financial institutions
  • SQL Database for storing transactions
    • I personally use Postgres but any SQLAlchemy compatible DB should work
    • This README uses SQLite
    • I use NocoDB as a viewer/explorer with filters and groups by Account, Category and so on
    • I use Metabase to create dashboards
    • Your imagination is the limit here!
    • You can read more about how I use this + some screenshots in my wiki.
  • Inspired by yyx990803/build-your-own-mint.

Requirements

Plaid

  • Create a Plaid account
  • You need development access to handle multiple accounts
    • You can use it on development mode for free up to 100 accounts
  • I asked for production access and it was simple, just fill the form and say you are not a company and that you will use it for personal use
  • Get your client_id and secret from the Plaid dashboard

Logging in to Banks

Use the plaid/quickstart to login to your institution.

Once you've linked the bank save the ACCESS_TOKEN. in the config file. See settings below.

Database

Simply write the SQLAlchemy connection string in the config file.

Config

The project reads it's config from ~/.config/dinero/config.toml. You can see a sample in config.sample.toml.

For Plaid you need to set the token for each institution:

[plaid.tokens]
bank_1 = "access-development-XXXXXXXXXXXXXXXX"
bank_2 = "access-development-YYYYYYYYYYYYYYYY"

And a mapping to make the Account ID human readable:

[plaid.account_id_to_name]
THIS_IS_A_LONG_ID_1_XXXXXXXXXXXXXXXXXXXXXX = "Bank 1 Checking"
THIS_IS_A_LONG_ID_2_YYYYYYYYYYYYYYYYYYYYYY = "Bank 2 Credit Card"

Usage

After you have the requirements and config file.

Install by cloning the repo and installing the dependencies using your favorite Python environment manager.

Create DB and tables:

dinero init-db

Get new transactions and add them to the database:

dinero transactions

Example output:

2023-09-21 11:06.45 [info     ] Transactions downloaded        name=XXX records=49
2023-09-21 11:06.45 [info     ] Transactions pending           name=XXX records=1
2023-09-21 11:06.45 [info     ] Transactions not pending       name=XXX records=48
2023-09-21 11:06.58 [info     ] Loaded table                   recods=662 year=2023
--------------------------------------------------------------------------------
My Bank - Checking
--------------------------------------------------------------------------------
2023-09-21 11:06.58 [info     ] Queried transactions           n=17
2023-09-21 11:06.58 [info     ] Pending transactions           n=0
2023-09-21 11:06.58 [info     ] New transactions to be added   n=2
2023-09-21 11:06.58 [info     ] Transaction                    transaction={'Account': 'BoA Checking', 'Amount': XXX, 'Category': '', 'Date': '2023-09-20', 'Description': 'XXXX', 'Subcategory': ''}
2023-09-21 11:06.58 [info     ] Transaction                    transaction={'Account': 'BoA Checking', 'Amount': XXX, 'Category': '', 'Date': '2023-09-20', 'Description': 'XXXX', 'Subcategory': ''}
2023-09-21 11:06.58 [info     ] Existing transactions          n=15
2023-09-21 11:06.58 [info     ] Error transactions             n=0

================================================================================
All accounts summary from 2023-08-22 to 2023-09-21:
================================================================================
Using Table for year: 2023
Records in table: 662
Transactions queried: 49
Pending transactions: 1
Transactions analysed (pending False): 48
New records to be inserted: 5
Existing transactions: 43
Errors transactions (not valid dates for table): 0

Insert transactions to the Table? [Y/n]

Generate a set of simple rules that will be used to categorize transactions:

just rules

Generate a dataset with all transactions in CSV and SQLite:

just dataset

Other

There is a handy function to generate a Pandas DataFrame with all transactions: I use this to do some analysis in a Jupyter Notebook.

from dinero import analysis
df = analysis.get_dataframe()

Contributions

While I am happy to accept any contributions this is 100% tailored to how I use it so I might reject stuff I won't use.

If you want to do other things such as connecting to Airtable (initially I used Airtable but the new pricing made it not worth it) you should fork this repo and make your own changes.

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

dinero_tools-1.0.0.tar.gz (86.1 kB view details)

Uploaded Source

Built Distribution

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

dinero_tools-1.0.0-py3-none-any.whl (25.2 kB view details)

Uploaded Python 3

File details

Details for the file dinero_tools-1.0.0.tar.gz.

File metadata

  • Download URL: dinero_tools-1.0.0.tar.gz
  • Upload date:
  • Size: 86.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for dinero_tools-1.0.0.tar.gz
Algorithm Hash digest
SHA256 78b9b9745e31026895aea595238ccdac16af300e48d102c22a11eeeb0096badb
MD5 13e6cfeaaf1aa0339ca148596fc3cf24
BLAKE2b-256 fab540cc75df4f3ffd61fa7007f8aceca5750302f600b694a2b0bbd8a65d000d

See more details on using hashes here.

Provenance

The following attestation bundles were made for dinero_tools-1.0.0.tar.gz:

Publisher: release.yml on danielfrg/dinero

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file dinero_tools-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: dinero_tools-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 25.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for dinero_tools-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 4a46bc6ca2e3b65e083ba01dda46515cea5bf21571604157e2631d45c6fea76d
MD5 9213136801c714f5740b6c7f6f0a72f3
BLAKE2b-256 771fc22ae0e8b4785e8019fc04c0f85e6a679e353294887b1fdd58e87ff30794

See more details on using hashes here.

Provenance

The following attestation bundles were made for dinero_tools-1.0.0-py3-none-any.whl:

Publisher: release.yml on danielfrg/dinero

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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