Skip to main content

Add your description here

Project description

ledger2bql

Translate Ledger CLI query syntax into BQL

Implemented in Python.

Introduction

BQL is quite a powerful language for slicing and dicing Beancount data. But, when all you need are simple queries, writing every field and filter seems tedios. In comparison, Ledger CLI's syntax is short and efficient. A simple l b bank will list all bank accounts, assuming a well-organized account tree.

The purpose of this project, a simple CLI utility, is to accept a Ledger-like syntax, generate an appropriate BQL statement, and run it for you.

Development

Setup

Add an .env file, specifying the BEANCOUNT_FILE location.

BEANCOUNT_FILE=tests/sample_ledger.bean
uv sync

Build

uv build

Run

uv run ledger2bql

or run

l ...

Usage

Set the BEANCOUNT_FILE variable to point to your Beancount ledger file.

Run

ledger2bql b card
ledger2bql r card -b 2025-08-01

To get the list of available parameters, simply run

ledger2bql
ledger2bql bal --help
ledger2bql reg --help

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

ledger2bql-0.4.0.tar.gz (18.9 kB view details)

Uploaded Source

Built Distribution

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

ledger2bql-0.4.0-py3-none-any.whl (19.9 kB view details)

Uploaded Python 3

File details

Details for the file ledger2bql-0.4.0.tar.gz.

File metadata

  • Download URL: ledger2bql-0.4.0.tar.gz
  • Upload date:
  • Size: 18.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.8.14

File hashes

Hashes for ledger2bql-0.4.0.tar.gz
Algorithm Hash digest
SHA256 8fef354f8709efe8302d759c2f72cb5992748055bdb4f61d3f813fbcd3590fcd
MD5 1067b7ec76ec45f793beb98b8f95ea5e
BLAKE2b-256 34f7c2eff0047ab113711d7b84af5e696d5f2cdfc7b35a6a9edf5ab2c7fe3838

See more details on using hashes here.

File details

Details for the file ledger2bql-0.4.0-py3-none-any.whl.

File metadata

  • Download URL: ledger2bql-0.4.0-py3-none-any.whl
  • Upload date:
  • Size: 19.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.8.14

File hashes

Hashes for ledger2bql-0.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 d2d527ba141fb0d81bcd438b181732b10dce3fb02bfa04cd4cb1973aaddb04e7
MD5 e56effadc046af967d28aafc1c21eb15
BLAKE2b-256 8e23fcc6a96a33922fa0f3d359209ce532c235db791d06c9c368a73b660bb880

See more details on using hashes here.

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