|
| 1 | +# SimpleFIN Python Library |
| 2 | + |
| 3 | +## Installation |
| 4 | + |
| 5 | +`pip install simplefin-python` |
| 6 | + |
| 7 | +## Command line interface |
| 8 | + |
| 9 | +### Setup |
| 10 | + |
| 11 | +You will first need to get a setup token and convert it to an access URL. |
| 12 | + |
| 13 | +1. Create a new application connection in you SimpleFIN Bridge account. |
| 14 | +2. Copy the provided setup key to your clipboard. |
| 15 | +3. Run `simplefin setup` and paste the setup key from above. |
| 16 | +4. Securely store the provided Access URL as it is required for future calls. |
| 17 | + |
| 18 | +See [#1](https://github.com/chrishas35/simplefin-python/issues/1) for discussion on securely storing this in future releases. |
| 19 | + |
| 20 | +### Usage |
| 21 | + |
| 22 | +Your Access URL will need to be stored in an environment variable called `SIMPLEFIN_ACCESS_URL` for future CLI calls. |
| 23 | + |
| 24 | +Examples below leverage the SimpleFIN Bridge Demo Access URL of `https://demo:demo@beta-bridge.simplefin.org/simplefin`. Real world Account IDs will be in the format of `ACT-[guid]`. |
| 25 | + |
| 26 | +#### Get accounts |
| 27 | + |
| 28 | + ❯ simplefin accounts |
| 29 | + SimpleFIN Accounts |
| 30 | + ┏━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━┳━━━━━━━━━━━━━━━┓ |
| 31 | + ┃ Institution ┃ Account ┃ Balance ┃ Account ID ┃ |
| 32 | + ┡━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━╇━━━━━━━━━━━━━━━┩ |
| 33 | + │ SimpleFIN Demo │ SimpleFIN Savings │ 114125.50 │ Demo Savings │ |
| 34 | + │ SimpleFIN Demo │ SimpleFIN Checking │ 24302.22 │ Demo Checking │ |
| 35 | + └────────────────┴────────────────────┴───────────┴───────────────┘ |
| 36 | + |
| 37 | +#### Get transactions for an account |
| 38 | + |
| 39 | +`simplefin transactions ACCOUNT_ID [--format FORMAT]` |
| 40 | + |
| 41 | + ❯ simplefin transactions "Demo Savings" |
| 42 | + Transactions for Demo Savings |
| 43 | + ┏━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━┓ |
| 44 | + ┃ Date ┃ Payee ┃ Amount ┃ |
| 45 | + ┡━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━┩ |
| 46 | + │ 10 Jan 2025 │ John's Fishin Shack │ -50.00 │ |
| 47 | + │ 10 Jan 2025 │ Grocery store │ -90.00 │ |
| 48 | + │ 11 Jan 2025 │ John's Fishin Shack │ -55.50 │ |
| 49 | + │ 11 Jan 2025 │ Grocery store │ -85.50 │ |
| 50 | + └─────────────┴─────────────────────┴────────┘ |
| 51 | + |
| 52 | +##### JSON output |
| 53 | + |
| 54 | +We convert the posted and transacted_at, if provided, values into ISO strings. |
| 55 | + |
| 56 | + ❯ simplefin transactions "Demo Savings" --format json |
| 57 | + [ |
| 58 | + { |
| 59 | + "id": "1736496000", |
| 60 | + "posted": "2025-01-10T08:00:00+00:00", |
| 61 | + "amount": "-50.00", |
| 62 | + "description": "Fishing bait", |
| 63 | + "payee": "John's Fishin Shack", |
| 64 | + "memo": "JOHNS FISHIN SHACK BAIT" |
| 65 | + }, |
| 66 | + { |
| 67 | + "id": "1736524800", |
| 68 | + "posted": "2025-01-10T16:00:00+00:00", |
| 69 | + "amount": "-90.00", |
| 70 | + "description": "Grocery store", |
| 71 | + "payee": "Grocery store", |
| 72 | + "memo": "LOCAL GROCER STORE #1133" |
| 73 | + }, |
| 74 | + { |
| 75 | + "id": "1736582400", |
| 76 | + "posted": "2025-01-11T08:00:00+00:00", |
| 77 | + "amount": "-55.50", |
| 78 | + "description": "Fishing bait", |
| 79 | + "payee": "John's Fishin Shack", |
| 80 | + "memo": "JOHNS FISHIN SHACK BAIT" |
| 81 | + }, |
| 82 | + { |
| 83 | + "id": "1736611200", |
| 84 | + "posted": "2025-01-11T16:00:00+00:00", |
| 85 | + "amount": "-85.50", |
| 86 | + "description": "Grocery store", |
| 87 | + "payee": "Grocery store", |
| 88 | + "memo": "LOCAL GROCER STORE #1133" |
| 89 | + } |
| 90 | + ] |
0 commit comments