Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

beancount-parser

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

beancount-parser

Standalone Lark based Beancount syntax parser (not relying on Beancount library), MIT license

  • 1.2.3
  • PyPI
  • Socket score

Maintainers
1

beancount-parser CircleCI

Standalone Lark LALR(1) based Beancount syntax parser (not relying on Beancount library), MIT license

Please also checkout out beancount-black, an opinionated beancount code formatter based on beancount-parser.

Features

  • MIT licensed - the only dependency is Lark
  • Extremely fast - LALR(1) is used
  • Section awareness - emac org symbol mark * will be parsed
  • Comment awareness - comments will be parsed
  • Not a validator - it does not validate beancount syntax, invalid beancount syntax may still pass the parsing

Sponsor

The original project beancount-parser was meant to be an internal tool built by Launch Platform LLC for

BeanHub logo

A modern accounting book service based on the most popular open source version control system Git and text-based double entry accounting book software Beancount. We realized adding new entries with BeanHub automatically over time makes the beancount file a mess. So, a strong code formatter is needed. While SaaS businesses won't be required to open-source an internal tool like this, we still love that the service is only possible because of the open-source tool we are using. It would be greatly beneficial for the community to access a tool like this, so we've decided to open-source it under an MIT license. We hope you find this tool useful 😄

Install

To install the parser, simply run

pip install beancount-parser

Usage

If you want to run the parse beancount code, you can do this

import io

from beancount_parser.parser import make_parser

parser = make_parser()
tree = parser.parse(beancount_content)
# do whatever you want with the tree here

Feedbacks

Feedbacks, bugs reporting or feature requests are welcome 🙌, just please open an issue. No guarantee we have time to deal with them, but will see what we can do.

FAQs


Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc