An experiment to work with piecash to analyze my investment portfolio
Find a file
2026-05-23 20:14:21 +10:00
vendor/piecash Initial version with working gnucash_allocation script 2026-05-23 20:14:21 +10:00
.gitignore Initial version with working gnucash_allocation script 2026-05-23 20:14:21 +10:00
.python-version Initial version with working gnucash_allocation script 2026-05-23 20:14:21 +10:00
AGENTS.md Initial version with working gnucash_allocation script 2026-05-23 20:14:21 +10:00
explore_gnucash.py Initial version with working gnucash_allocation script 2026-05-23 20:14:21 +10:00
gnucash_allocation.py Initial version with working gnucash_allocation script 2026-05-23 20:14:21 +10:00
pyproject.toml Initial version with working gnucash_allocation script 2026-05-23 20:14:21 +10:00
README.md Initial version with working gnucash_allocation script 2026-05-23 20:14:21 +10:00
sample.config.toml Initial version with working gnucash_allocation script 2026-05-23 20:14:21 +10:00
uv.lock Initial version with working gnucash_allocation script 2026-05-23 20:14:21 +10:00

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 — added overlaps="parent,slots" to Account.slots relation
  • vendor/piecash/piecash/budget.py — added overlaps="recurrence" to Budget.recurrence relation
  • vendor/piecash/piecash/business/person.py — added overlaps="jobs" to Person.jobs relation
  • vendor/piecash/piecash/kvp.py — added overlaps="parent,slots" to SlotFrame.slots relation

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 target
  • explore_gnucash.py — marimo notebook for exploring a GnuCash book