gsbparse
A Python library for parsing Grisbi .gsb accounting files
into typed domain objects, with an optional pandas adapter for DataFrame output.
Documentation: gsbparse.readthedocs.io
Installation
pip install gsbparse
Or with uv:
uv add gsbparse
Requires Python 3.13+.
Quickstart
Read a file
import gsbparse
gsb = gsbparse.read_gsb("my_accounts.gsb")
Inspect typed sections
>>> gsb.currencies
[Currency(Nb=1, Na='Euro', Co='€', Ico='EUR', Fl=2), Currency(Nb=2, Na='US Dollar', Co='$', Ico='USD', Fl=2)]
>>> for account in gsb.accounts:
... print(account.Number, account.Name)
1 Checking
2 Savings
Detailed transactions (foreign keys resolved)
>>> tx = gsb.detailed_transactions[0]
>>> tx.Dt
datetime.date(2024, 1, 5)
>>> tx.Am
Decimal('-42.50')
>>> tx.Ac.Name
'Checking'
>>> tx.Pa.Na
'Supermarket'
Convert to pandas DataFrame
>>> from gsbparse.pandas import to_df
>>> to_df(gsb.currencies)
Nb Na Co Ico Fl
0 1 Euro € EUR 2
1 2 US Dollar $ USD 2
Custom column projection:
>>> from gsbparse import DetailedTransactionColumn
>>> columns = [
... DetailedTransactionColumn(path="Dt", output_name="date"),
... DetailedTransactionColumn(path="Am", output_name="amount"),
... DetailedTransactionColumn(path="Ac.Name", output_name="account"),
... DetailedTransactionColumn(path="Pa.Na", output_name="party"),
... DetailedTransactionColumn(path="Ca.Na", output_name="category"),
... ]
>>> to_df(gsb.detailed_transactions, columns=columns)
date amount account party category
0 2024-01-05 -42.50 Checking Supermarket Food
1 2024-01-31 2500.00 Checking Employer Income
See the full quickstart and API reference on Read the Docs.
Development
git clone https://github.com/etnbsd/gsbparse.git
cd gsbparse
uv sync --dev
pre-commit install
Common commands (via make):
| Command | What it does |
|---|---|
make test |
Run the test suite |
make lint |
Run ruff check |
make format |
Run ruff format |
make type-check |
Run mypy in strict mode |
make import-check |
Enforce hexagonal import boundaries |
make ci |
Run all of the above |
Contributing
- Fork the repo and create a short-lived branch.
- Follow Conventional Commits — enforced by pre-commit.
- Open a pull request against
main.
Release files for gsbparse 0.8.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| gsbparse-0.8.2.tar.gz | 140.1 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| gsbparse-0.8.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 206.5 kB
Release files / gsbparse-0.8.2.tar.gz
| Download URL | gsbparse-0.8.2.tar.gz |
|---|---|
| Size | 140.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
9b076b1fffa498423ac6dbaec47b2b7a3929b3d2e4fa6ccefcd49fb275bb9459
|
|
BLAKE2b-256 checksum How to use checksums |
ae00da45988cc7e3c298635829180995d8b9834bacff51dfdc42fb5b4f823e96
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on May 11, 2026.
Transparency logRelease files / gsbparse-0.8.2-py3-none-any.whl
| Download URL | gsbparse-0.8.2-py3-none-any.whl |
|---|---|
| Size | 66.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
8382e7c7dbdeee4cae692bd576c0989c4266695132bffca7d33769fc0a65c374
|
|
BLAKE2b-256 checksum How to use checksums |
e320e5d2b30d2c1c583d23da2e8b736176a9eb4e4826e9c9fbdee15d66ab54fc
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on May 11, 2026.
Transparency log