This is a Python script for the great MoneyMoney software to generate a list with all balances by bank account.
This is useful e.g. to export the total values per bank to a summary Excel document or to monitor certain threshold values per bank.
This script requires at least Python 3.10.
pip install -r requirements.txt
On Mac if you (optionally) want to use this Python script within the services menu of the MoneyMoney application, the best way is to use the Mac Automator:
- Create a new "Quick Action Workflow" in Automator
- Choose "No Input" in "MoneyMoney"
- Add the action "Execute AppleScript" and paste this script into the text box and adapt the script path accordingly:
on run {input, parameters} tell application "Terminal" do script "python3 ~/path/to/script/moneymoney_sum_by_bank.py && read -s -n 1 key && exit 0" end tell return input end run
- Save the workflow
Then you have a new menu item with the chosen name in MoneyMoney > Services.
python3 moneymoney_sum_by_bank.py
Note: The MoneyMoney application has to be unlocked when executing the script otherwise an error will be thrown.
This Python script sums all account balances from MoneyMoney by the bank code of the BIC (first 4 digits).
If a BIC is not available (e.g. in case of an offline or a credit card account),
the script looks for a custom attribute bankIdentifier
in the account settings and uses this as reference.
If neither of this information is available on the account and it has a balance, the value is added to "other".
The result of the Python script can e.g. be used in Excel:
For more information see also my blog post.