Skip to main content

Beancount LSB Importer

image image Ruff

beancount-lsb provides an importer for converting CSV exports of LSB (Lån & Spar Bank) account summaries to the Beancount format.

Installation

$ pip install beancount-lsb

In case you prefer installing from the Github repository, please note that main is the development branch so stable is what you should be installing from.

Usage

If you're not familiar with how to import external data into Beancount, please read this guide first.

Beancount 3.x

Beancount 3.x has replaced the config.py file based workflow in favor of having a script based workflow, as per the changes documented here. The beangulp examples suggest using a Python script based on beangulp.Ingest. Here's an example of how that might work:

Add an import.py script in your project root with the following contents:

from beancount_lsb import LSBImporter
from beangulp import Ingest

importers = (
    LSBImporter(
        "Assets:LSB:Checking",
        "0400 4024493887",
        currency="DKK",
    ),
)

if __name__ == "__main__":
    ingest = Ingest(importers)
    ingest()

... and run it directly using python import.py extract.

Beancount 2.x

Adjust your config file to include LSBImporter.

Add the following to your config.py:

from beancount_lsb import LSBImporter

CONFIG = [
    LSBImporter(
        "Assets:LSB:Checking",
        "0400 4024493887",
        currency="DKK",
    ),
]

Once this is in place, you should be able to run bean-extract on the command line to extract the transactions and pipe all of them into your Beancount file.

$ bean-extract /path/to/config.py Posteringsdetaljer.csv >> you.beancount

Contributing

Contributions are most welcome!

Please make sure you have Python 3.11+ and uv installed.

  1. Clone the repository: git clone https://github.com/joandrsn/beancount-lsb
  2. Install the packages required for development: uv sync --dev
  3. That's basically it. You should now be able to run the test suite: uv run pytest.

Metadata

Release files for beancount-lsb 1.0.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-lsb 1.0.0
File Size Uploaded Provenance
beancount_lsb-1.0.0.tar.gz 9.0 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for beancount-lsb 1.0.0
File Interpreter ABI Platform
beancount_lsb-1.0.0-py3-none-any.whl Python 3 none any Details

Total release size: 15.9 kB

Release files / beancount_lsb-1.0.0.tar.gz

Download URL beancount_lsb-1.0.0.tar.gz
Size 9.0 kB
Tags Source
SHA-256 checksum
How to use checksums
e4159f7df928dc22f28a6b49ccf6852eddcda688f969ed336f13d99830736a95
BLAKE2b-256 checksum
How to use checksums
0e301b2af3c6edceb717817ae022dac0274788949b810bafd97a88a47940f608
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.9.21 {"installer":{"name":"uv","version":"0.9.21","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}

Release files / beancount_lsb-1.0.0-py3-none-any.whl

Download URL beancount_lsb-1.0.0-py3-none-any.whl
Size 6.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
231c706014ee6a274164dfaa35502a74a90f33bd836682fb2730a6b710238854
BLAKE2b-256 checksum
How to use checksums
6db9aad2784956d32637c11224795b9feaa60ab1148b20937816bff63febf640
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.9.21 {"installer":{"name":"uv","version":"0.9.21","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}

Security for beancount-lsb 1.0.0

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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

1.0.0 This release

2 release files No provenance

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