Beancount Importer for LSB CSV exports
Project description
Beancount LSB Importer
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.
- Clone the repository:
git clone https://github.com/joandrsn/beancount-lsb - Install the packages required for development:
uv sync --dev - That's basically it. You should now be able to run the test suite:
uv run pytest.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file beancount_lsb-1.0.0.tar.gz.
File metadata
- Download URL: beancount_lsb-1.0.0.tar.gz
- Upload date:
- Size: 9.0 kB
- Tags: Source
- Uploaded using 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}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e4159f7df928dc22f28a6b49ccf6852eddcda688f969ed336f13d99830736a95
|
|
| MD5 |
4f51fc51908752fa5681adaa0bec18be
|
|
| BLAKE2b-256 |
0e301b2af3c6edceb717817ae022dac0274788949b810bafd97a88a47940f608
|
File details
Details for the file beancount_lsb-1.0.0-py3-none-any.whl.
File metadata
- Download URL: beancount_lsb-1.0.0-py3-none-any.whl
- Upload date:
- Size: 6.9 kB
- Tags: Python 3
- Uploaded using 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}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
231c706014ee6a274164dfaa35502a74a90f33bd836682fb2730a6b710238854
|
|
| MD5 |
572aaa2c6379448873e05014d895a70c
|
|
| BLAKE2b-256 |
6db9aad2784956d32637c11224795b9feaa60ab1148b20937816bff63febf640
|