SkillAgentSearch skills...

Bapi

The Beancount API (bapi) provides an HTTP API for interacting with a Beancount ledger file

Install / Use

/learn @jmgilman/Bapi
About this skill

Quality Score

0/100

Supported Platforms

Universal

README

Beancount API (bapi)

<p align="center"> <a href="https://github.com/jmgilman/bapi/actions/workflows/ci.yml"> <img src="https://github.com/jmgilman/bapi/actions/workflows/ci.yml/badge.svg"/> </a> <a href="https://jmgilman.github.io/bapi/"> <img src="https://img.shields.io/badge/docs-passing-brightgreen"/> </a> </p>

An HTTP API for serving up data contained within a Beancount ledger file.

The Beancount API is an HTTP API built on FastAPI and provides programmatic access to a Beancount ledger. It is OpenAPI compliant and provides rich access to the data contained within a ledger.

Usage

The quickest way to deploy the API is via a container:

docker run \
    -v $(pwd)/testing/static.beancount:/run/beancount/main.beancount \
    -p 8080:8080 \
    ghcr.io/jmgilman/bapi

It can then be queried:

curl http://localhost:8080/v1/directive

The API provides several configuration options for securing access as well as automatically fetching ledger files from remote sources. See the docs for more in-depth usage and configuration information.

Endpoints

| Endpoint | Description | --------------- | ------------------------------------------------------------------------------------ | | /v1/account | Fetch, list, and realize all accounts in the ledger | | /v1/directive | Fetch all directives by type or generate Beancount syntax for each directive type | | /v1/file | Fetch the entire contents of the ledger file | | /v1/query | Fetch the results of querying the Beancount data using a BQL query | | /v1/realize | Performs a realization against the ledger |

Related Skills

View on GitHub
GitHub Stars9
CategoryDevelopment
Updated5mo ago
Forks2

Languages

Python

Security Score

82/100

Audited on Oct 6, 2025

No findings