Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
191 changes: 138 additions & 53 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,66 +25,151 @@ Examples below leverage the SimpleFIN Bridge Demo Access URL of `https://demo:de

#### Get accounts

❯ simplefin accounts
SimpleFIN Accounts
┏━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━┳━━━━━━━━━━━━━━━┓
┃ Institution ┃ Account ┃ Balance ┃ Account ID ┃
┡━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━╇━━━━━━━━━━━━━━━┩
│ SimpleFIN Demo │ SimpleFIN Savings │ 114125.50 │ Demo Savings │
│ SimpleFIN Demo │ SimpleFIN Checking │ 24302.22 │ Demo Checking │
└────────────────┴────────────────────┴───────────┴───────────────┘
`simplefin accounts [--format FORMAT]`

<!-- [[[cog
import cog
from simplefin import cli
from click.testing import CliRunner
runner = CliRunner()
result = runner.invoke(cli, ["accounts"])
cog.out(
"```\n❯ simplefin accounts\n{}```".format(result.output)
)
]]] -->
```
❯ simplefin accounts
SimpleFIN Accounts
┏━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━┳━━━━━━━━━━━━━━━┓
┃ Institution ┃ Account ┃ Balance ┃ Account ID ┃
┡━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━╇━━━━━━━━━━━━━━━┩
│ SimpleFIN Demo │ SimpleFIN Savings │ 115525.50 │ Demo Savings │
│ SimpleFIN Demo │ SimpleFIN Checking │ 26134.42 │ Demo Checking │
└────────────────┴────────────────────┴───────────┴───────────────┘
```
<!-- [[[end]]] -->

##### JSON output

<!-- [[[cog
import cog
from simplefin import cli
from click.testing import CliRunner
runner = CliRunner()
result = runner.invoke(cli, ["accounts", "--format", "json"])
cog.out(
"```\n❯ simplefin accounts --format json\n{}```".format(result.output)
)
]]] -->
```
❯ simplefin accounts --format json
[
{
"org": {
"domain": "beta-bridge.simplefin.org",
"sfin-url": "https://beta-bridge.simplefin.org/simplefin",
"name": "SimpleFIN Demo",
"url": "https://beta-bridge.simplefin.org",
"id": "simplefin.demoorg"
},
"id": "Demo Savings",
"name": "SimpleFIN Savings",
"currency": "USD",
"balance": "115525.50",
"available-balance": "115525.50",
"balance-date": 1738368000,
"transactions": [],
"holdings": []
},
{
"org": {
"domain": "beta-bridge.simplefin.org",
"sfin-url": "https://beta-bridge.simplefin.org/simplefin",
"name": "SimpleFIN Demo",
"url": "https://beta-bridge.simplefin.org",
"id": "simplefin.demoorg"
},
"id": "Demo Checking",
"name": "SimpleFIN Checking",
"currency": "USD",
"balance": "26134.42",
"available-balance": "26134.42",
"balance-date": 1738368000,
"transactions": [],
"holdings": []
}
]
```
<!-- [[[end]]] -->

#### Get transactions for an account

`simplefin transactions ACCOUNT_ID [--format FORMAT] [--lookback-days INTEGER]`

❯ simplefin transactions "Demo Savings"
Transactions for Demo Savings
┏━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━┓
┃ Date ┃ Payee ┃ Amount ┃
┡━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━┩
│ 10 Jan 2025 │ John's Fishin Shack │ -50.00 │
│ 10 Jan 2025 │ Grocery store │ -90.00 │
│ 11 Jan 2025 │ John's Fishin Shack │ -55.50 │
│ 11 Jan 2025 │ Grocery store │ -85.50 │
└─────────────┴─────────────────────┴────────┘
<!-- [[[cog
import cog
from simplefin import cli
from click.testing import CliRunner
runner = CliRunner()
result = runner.invoke(cli, ["transactions", "Demo Savings", "--lookback-days", 1])
cog.out(
"```\n❯ simplefin transactions \"Demo Savings\"\n{}```".format(result.output)
)
]]] -->
```
❯ simplefin transactions "Demo Savings"
Transactions for Demo Savings
┏━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━┓
┃ Date ┃ Payee ┃ Amount ┃
┡━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━┩
│ 01 Feb 2025 │ You │ 1960.00 │
│ 01 Feb 2025 │ John's Fishin Shack │ -05.50 │
│ 01 Feb 2025 │ Grocery store │ -135.50 │
└─────────────┴─────────────────────┴─────────┘
```
<!-- [[[end]]] -->

##### JSON output

We convert the posted and transacted_at, if provided, values into ISO strings.

❯ simplefin transactions "Demo Savings" --format json
[
{
"id": "1736496000",
"posted": "2025-01-10T08:00:00+00:00",
"amount": "-50.00",
"description": "Fishing bait",
"payee": "John's Fishin Shack",
"memo": "JOHNS FISHIN SHACK BAIT"
},
{
"id": "1736524800",
"posted": "2025-01-10T16:00:00+00:00",
"amount": "-90.00",
"description": "Grocery store",
"payee": "Grocery store",
"memo": "LOCAL GROCER STORE #1133"
},
{
"id": "1736582400",
"posted": "2025-01-11T08:00:00+00:00",
"amount": "-55.50",
"description": "Fishing bait",
"payee": "John's Fishin Shack",
"memo": "JOHNS FISHIN SHACK BAIT"
},
{
"id": "1736611200",
"posted": "2025-01-11T16:00:00+00:00",
"amount": "-85.50",
"description": "Grocery store",
"payee": "Grocery store",
"memo": "LOCAL GROCER STORE #1133"
}
]
<!-- [[[cog
import cog
from simplefin import cli
from click.testing import CliRunner
runner = CliRunner()
result = runner.invoke(cli, ["transactions", "Demo Savings", "--format", "json", "--lookback-days", 1])
cog.out(
"```\n❯ simplefin transactions \"Demo Savings\" --format json\n{}```".format(result.output)
)
]]] -->
```
❯ simplefin transactions "Demo Savings" --format json
[
{
"id": "1738382400",
"posted": "2025-02-01T04:00:00+00:00",
"amount": "1960.00",
"description": "Pay day!",
"payee": "You",
"memo": "PAY DAY - FROM YER JOB"
},
{
"id": "1738396800",
"posted": "2025-02-01T08:00:00+00:00",
"amount": "-05.50",
"description": "Fishing bait",
"payee": "John's Fishin Shack",
"memo": "JOHNS FISHIN SHACK BAIT"
},
{
"id": "1738425600",
"posted": "2025-02-01T16:00:00+00:00",
"amount": "-135.50",
"description": "Grocery store",
"payee": "Grocery store",
"memo": "LOCAL GROCER STORE #1133"
}
]
```
<!-- [[[end]]] -->
3 changes: 2 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ build-backend = "hatchling.build"

[dependency-groups]
dev = [
"cogapp>=3.4.1",
"pytest>=8.3.4",
"pytest-httpx>=0.35.0",
"ruff>=0.9.0",
Expand All @@ -32,4 +33,4 @@ source = "vcs"
raw-options = { local_scheme = "no-local-version" }

[tool.hatch.build.targets.wheel]
packages = ["src/simplefin"]
packages = ["src/simplefin"]
11 changes: 11 additions & 0 deletions uv.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.