Skip to main content

A comprehensive collection of beancount tools: importers, price fetchers, plugins, and utilities

Project description

Beancount Tools Collection

🧮 My personal collection of beancount tools including importers, price fetchers, plugins, and utilities for various financial institutions.

Python 3.9+ License: MIT GitHub issues

Features

📥 Data Importers

Swiss Institutions:

  • Yuh - CSV exports
  • Viseca - JSON transaction exports (including Migros Cumulus Credit Card)
  • VIAC - JSON transaction exports (pillar 2 & 3a)
  • Finpension - CSV transaction reports (pillar 3a)

International Institutions:

  • Interactive Brokers - FlexQuery XML reports (global)
  • Revolut - CSV exports (multi-country)

Other Formats:

  • Firefly III - CSV exports

💰 Price Fetchers

  • Interactive Brokers - Real-time prices from FlexQuery

🔌 Beancount Plugins

  • Crickets chirping 🦗 - This section is as empty as my wallet after buying crypto at the peak

🛠️ Utility Scripts

  • Transaction Processor - Example transaction processing with ImporterProtocolAdapter and TransactionInspector for automatic categorization and payee standardization

Installation

From PyPI

pip install beancount-tools-collection

From Source

git clone https://github.com/mekanics/beancount-tools-collection.git
cd beancount-tools-collection
pip install -e .

Quick Start

Basic Importer Configuration

from beancount_tools_collection.importers import (
    finpension, ibkr, revolut,
    viac, viseca, yuh
)

# Example configuration
CONFIG = [
    # Swiss institutions
    finpension.FinpensionImporter(
        root_account="Assets:Pension:S3:Finpension:Portfolio1",
        deposit_account="Assets:Checking",
        isin_lookup={
            "CH0132501898": "CH0132501898",  # Example ISIN mapping
            # ... more ISINs
        }
    ),

    viac.ViacImporter(
        root_account="Assets:Pension:S3a:Viac:Portfolio1",
        deposit_account="Assets:Checking",
        share_lookup={
            "UBS SMI": {"isin": "CH0033782431", "symbol": "CH0033782431"},
            # ... more share mappings
        }
    ),

    yuh.YuhImporter(
        account="Assets:Cash:Yuh:CHF",
        goals_base_account="Assets:Savings:Yuh"
    ),

    # International institutions
    ibkr.IBKRImporter(
        Mainaccount="Assets:Invest:InteractiveBrokers",
        DivAccount="Income:Dividends:InteractiveBrokers",
        WHTAccount="Expenses:Taxes:WithholdingTax",
        PnLAccount="Income:Invest:Gains",
        FeesAccount="Expenses:Invest:Fees",
        configFile="ibkr.yaml"  # Your IBKR FlexQuery config
    ),

    revolut.RevolutImporter(
        "revolut_chf",
        "Assets:Cash:Revolut:CHF",
        "CHF"
    ),
]

Price Fetcher Configuration

# In your beancount price configuration
from beancount_tools_collection.prices import ibkr

# The IBKR price source will be available for bean-price

Documentation

Importer-Specific Setup

Each importer has specific requirements and configuration options:

Account Structure Examples

The importers work best with structured account hierarchies:

Assets:
  Cash:
    Yuh:
      CHF
      USD
    Revolut:
      CHF
      EUR
  Invest:
    InteractiveBrokers:
      Long-Term:
        VTI
        VXUS
        USD
  Pension:
    S3a:
      Finpension:
        Portfolio1:
          CHF
      Viac:
        Portfolio1:
          CH0132501898

Income:
  Dividends:
    InteractiveBrokers:
      Long-Term:
        USD
  Pension:
    S3a:
      Finpension:
        Portfolio1:
          Interest:
            CHF

Expenses:
  Invest:
    Fees:
      CHF
      USD
  Taxes:
    WithholdingTax

Contributing

We welcome contributions! Here's how you can help:

  1. Add new importers for financial institutions
  2. Improve existing importers with bug fixes and features
  3. Add price fetchers for different data sources
  4. Create plugins for common beancount workflows
  5. Improve documentation and examples

Development Setup

git clone https://github.com/mekanics/beancount-tools-collection.git
cd beancount-tools-collection
pip install -e ".[dev]"

Running Tests

pytest

Code Formatting

black src/
isort src/

License

This project is licensed under the MIT License - see the LICENSE file for details.

Acknowledgments

  • The beancount project for the excellent accounting framework
  • Various open-source beancount importers that served as inspiration

Support


Made with ❤️ for personal finance tracking

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

beancount_tools_collection-1.0.0.tar.gz (37.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

beancount_tools_collection-1.0.0-py3-none-any.whl (39.8 kB view details)

Uploaded Python 3

File details

Details for the file beancount_tools_collection-1.0.0.tar.gz.

File metadata

File hashes

Hashes for beancount_tools_collection-1.0.0.tar.gz
Algorithm Hash digest
SHA256 cca0265b3f8f81161996efcd80cd1e61c11234f979b0db56488aa9ba8d9effa1
MD5 dada928f67f4858759601fe3a72f8081
BLAKE2b-256 59fb5d50a61083acdade9edc5599a255909240b19a5a5fc5ef5fc1d37c394150

See more details on using hashes here.

Provenance

The following attestation bundles were made for beancount_tools_collection-1.0.0.tar.gz:

Publisher: release.yml on mekanics/beancount-tools-collection

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file beancount_tools_collection-1.0.0-py3-none-any.whl.

File metadata

File hashes

Hashes for beancount_tools_collection-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 214a320c071ec8ea13eb11e005235b10951fbbde5fc2d26f70a22a4837b2ee33
MD5 b6c5d02e7ebbf344be5f856c7c92e5cc
BLAKE2b-256 111e325fdb6797b1fff23243d6e6dd552b345a1c1bc85a94ada5533faf84203a

See more details on using hashes here.

Provenance

The following attestation bundles were made for beancount_tools_collection-1.0.0-py3-none-any.whl:

Publisher: release.yml on mekanics/beancount-tools-collection

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page