Project 20 of 20, for Caitlin
Personal Finance App
The Act II capstone: Caitlin's personal finance app, the fun version, with budgets and monthly reports, in four modules with their own tests, taken home as a real package.
Sign up free to open itLog in
Act 2 needs a free account, so your work is saved as you go. Act 1 is open to everyone.
The brief
- CaitlinEveryone in our class says they'll keep a budget and nobody does, because the apps are all so boring.
- CaitlinI want one that does four things, money in, money out, a budget for each thing and a page a month.
- CaitlinI'll try it first with a made-up month, and made-up me has a bit of an arcade habit.
- PaulThis uses everything you've got, classes, a file, a command line and tests, and then it becomes a proper package.
A personal finance app for Caitlin, in four files, then a package:
- Every transaction has a day, an amount in whole pence (more than 0 in, less than 0 out), one of six categories, and a note. Income is the only money in.
- An amount of 0, a category that isn't one of the six, income that's money out and spending that's money in are all refused, with a reason.
- Each kind of spending can have a monthly budget of more than 0.
- The balance is everything in, less everything out.
- A month's report shows money in, money out, what went on each category against its budget, anything over, and what was left over.
- Everything is kept in
money.json, so it's still there next time. - It runs from the command line. A refusal says why, on stderr, and exits with code 1.
- It has tests, written by you, that would catch anyone breaking rules 2 to 5.
- At home, it's a package:
python -m financeruns it, andpytestruns its tests.
$ python cli.py add 2026-11-22 -3.20 food --note pasty Spent £3.20 on food on 2026-11-22. $ python cli.py add 2026-11-22 -1 sweets There's no category called sweets. $ python cli.py report 2026-11 November 2026 Money in: £1,450.00 Money out: £605.55 food: £81.60 of £120.00 fun: £53.95 of £40.00, over by £13.95 home: £450.00 of £450.00 travel: £20.00 Left over: £844.45
What's in it
- Mark it out first
- An error of your own
- Refused, and carrying on
- Days, not moments
- Which November
- The rules
- The money file
- The command line
- Your own tests
- Paul's review
- A folder of modules
- A proper package
- Ship it