Skip to main content

beancount-sparkasse

Beancount v3 importers for Sparkasse online banking exports and statements, built on beangulp.

  • AccountImporter reads the account exports CSV-CAMT and CSV - gefilterte Einträge.
  • CreditCardImporter reads the credit card export.
  • AccountStatementImporter reads the monthly Kontoauszug PDF into a balance assertion. The CSV exports carry no running balance, so this is what checks the ledger against the bank.

The card export also lists the direct debit that settles each statement. A ledger that books the settlement from the account it is paid from would count it twice; CreditCardImporter(..., ignore_settlements=True) skips it.

import beangulp
from beancount_sparkasse import (
    AccountImporter,
    AccountStatementImporter,
    CreditCardImporter,
)

importers = [
    AccountImporter(iban="DE17 1234 5678 0000 0000 01", account="Assets:Bank:Checking"),
    CreditCardImporter(card="4111 **** **** 1111", account="Liabilities:CreditCard"),
    AccountStatementImporter(
        iban="DE17 1234 5678 0000 0000 01", account="Assets:Bank:Checking"
    ),
]

if __name__ == "__main__":
    beangulp.Ingest(importers)()

Statement layouts

AccountStatementImporter knows the Kontoauszug designs since 2020, which differ in how they sign amounts. A statement in a design it does not know fails to import rather than being misread. Until a release supports a new design, subclass Layout for it and pass it ahead of the built-in ones:

import re

from beancount_sparkasse import LAYOUTS, AccountStatementImporter, Layout


class Layout2027(Layout):
    closing_line = re.compile(r"Saldo am (?P<date>[\d.]+)\s+(?P<amount>-?[\d.]+,\d{2})")


AccountStatementImporter(
    iban="DE17 1234 5678 0000 0000 01",
    account="Assets:Bank:Checking",
    layouts=[Layout2027(), *LAYOUTS],
)

Development

uv run prek install --hook-type pre-commit --hook-type pre-push
uv run pytest

Releasing

Pushing a v* tag publishes to PyPI with attestations and creates the GitHub release, its notes taken from the version's section of CHANGELOG.md. The release fails before publishing if pyproject.toml disagrees with the tag or the changelog has no section for it, and waits for approval of the pypi environment.

uv version --bump minor
# Rename CHANGELOG.md's Unreleased section to the new version and update the
# compare links at the bottom.
git commit -am "Release 0.2.0"
git tag -a v0.2.0 -m v0.2.0
git push origin main v0.2.0

Metadata

Release files for beancount-sparkasse 0.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for beancount-sparkasse 0.2.0
File Size Uploaded
beancount_sparkasse-0.2.0.tar.gz 11.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for beancount-sparkasse 0.2.0
File Interpreter ABI Platform
beancount_sparkasse-0.2.0-py3-none-any.whl Python 3 none any Details

Total release size: 22.5 kB

Release files / beancount_sparkasse-0.2.0.tar.gz

Download URL beancount_sparkasse-0.2.0.tar.gz
Size 11.8 kB
Tags Source
SHA-256 checksum
How to use checksums
5e7b68578172da2deec212fa4e5ca2230530cab674f7fee25169aad02e44792e
BLAKE2b-256 checksum
How to use checksums
b5d9c9411feb186b044db8fe6020251eab534b23d39fca663291bc6f42ae0727
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.12.23 {"installer":{"name":"uv","version":"0.12.23","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

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 Oct 8, 2026.

Transparency log

Release files / beancount_sparkasse-0.2.0-py3-none-any.whl

Download URL beancount_sparkasse-0.2.0-py3-none-any.whl
Size 10.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
efd29829c41fe0b8369079897b3fcd966c4239cfbb2e814abd61f58aee3e69e2
BLAKE2b-256 checksum
How to use checksums
f3210dfdbca472eb59fa4c460f022ae57039e2ba0d18b1304102890bf2a74ae1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.12.23 {"installer":{"name":"uv","version":"0.12.23","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

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 Oct 8, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.2.0 This release

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page