An experiment to work with piecash to analyze my investment portfolio
| vendor/piecash | ||
| .gitignore | ||
| .python-version | ||
| AGENTS.md | ||
| explore_gnucash.py | ||
| gnucash_allocation.py | ||
| pyproject.toml | ||
| README.md | ||
| sample.config.toml | ||
| uv.lock | ||
Piecash App
My experimental application to use GnuCash to check the allocation of my stock portfolio is aligned with my goals.
It uses piecash which looks to have been abandoned.
Vendored piecash
The vendor/piecash/ directory contains a vendored copy of piecash with patches applied to suppress SQLAlchemy 1.4+ relationship overlap warnings (see piecash#236).
Patches applied (from issue comment):
vendor/piecash/piecash/_declbase.py— addedoverlaps="parent,slots"toAccount.slotsrelationvendor/piecash/piecash/budget.py— addedoverlaps="recurrence"toBudget.recurrencerelationvendor/piecash/piecash/business/person.py— addedoverlaps="jobs"toPerson.jobsrelationvendor/piecash/piecash/kvp.py— addedoverlaps="parent,slots"toSlotFrame.slotsrelation
The install is managed via [tool.uv.sources] in pyproject.toml:
[tool.uv.sources]
piecash = { path = "vendor/piecash", editable = true }
Run uv sync to install the vendored version.
Scripts
gnucash_allocation.py— compare portfolio allocation against a targetexplore_gnucash.py— marimo notebook for exploring a GnuCash book