Skip to main content

beancount clone in Rust

Project description

bean-rs

Basic beancount clone (one day...) in Rust!

Still very very alpha and doesn't do most things that are necessary to be at all useful.

Python bindings are a WIP using PyO3;

The libraries:

Planned features:

  • Parse beancount files using pest
  • Stricter transaction keywords
  • Propagate line numbers for debugging
  • Calculate account balances
  • Use proper Decimal handling
  • Validate transactions against open/close directives
  • Validate balance directives
  • Pad statements
  • Open/close with multiple currencies
  • Add Python bindings
  • Support includes
  • Come up with a more punny name
  • Currency conversions
  • Price/cost and FIFO

(Deliberate) differences from beancount

  • Postings can't omit the currency

Use from Rust

Install

cargo install bean-rs

Run

$ bean-rs

Usage: bean-rs <COMMAND>

Commands:
  balance  Display account balances
  check    Check for errors and quit
  help     Print this message or the help of the given subcommand(s)

Options:
  -h, --help     Print help
  -V, --version  Print version

Calculate balances

bean-rs balance example.bean

Use from Python

More to come...

import bean_rs
ledger = bean_rs.py_load("example.bean")
print(ledger.opts)

Development

Build

make build

Test

make test

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

bean_rs-0.3.1.tar.gz (27.4 kB view details)

Uploaded Source

Built Distributions

bean_rs-0.3.1-pp310-pypy310_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.1 MB view details)

Uploaded PyPy manylinux: glibc 2.17+ x86-64

bean_rs-0.3.1-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.1 MB view details)

Uploaded PyPy manylinux: glibc 2.17+ x86-64

bean_rs-0.3.1-cp312-none-win_amd64.whl (254.5 kB view details)

Uploaded CPython 3.12 Windows x86-64

bean_rs-0.3.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.1 MB view details)

Uploaded CPython 3.12 manylinux: glibc 2.17+ x86-64

bean_rs-0.3.1-cp312-cp312-macosx_11_0_arm64.whl (342.3 kB view details)

Uploaded CPython 3.12 macOS 11.0+ ARM64

bean_rs-0.3.1-cp311-none-win_amd64.whl (254.5 kB view details)

Uploaded CPython 3.11 Windows x86-64

bean_rs-0.3.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.1 MB view details)

Uploaded CPython 3.11 manylinux: glibc 2.17+ x86-64

bean_rs-0.3.1-cp311-cp311-macosx_11_0_arm64.whl (342.9 kB view details)

Uploaded CPython 3.11 macOS 11.0+ ARM64

bean_rs-0.3.1-cp310-none-win_amd64.whl (254.6 kB view details)

Uploaded CPython 3.10 Windows x86-64

bean_rs-0.3.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.1 MB view details)

Uploaded CPython 3.10 manylinux: glibc 2.17+ x86-64

bean_rs-0.3.1-cp39-none-win_amd64.whl (254.8 kB view details)

Uploaded CPython 3.9 Windows x86-64

bean_rs-0.3.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.1 MB view details)

Uploaded CPython 3.9 manylinux: glibc 2.17+ x86-64

File details

Details for the file bean_rs-0.3.1.tar.gz.

File metadata

  • Download URL: bean_rs-0.3.1.tar.gz
  • Upload date:
  • Size: 27.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: maturin/1.5.1

File hashes

Hashes for bean_rs-0.3.1.tar.gz
Algorithm Hash digest
SHA256 5e87b5e835eddbe912bdf574fe78b950cd429baa303f21223aafcbebd3a196be
MD5 0cb59384afc5e6b2b4603b07e255e60e
BLAKE2b-256 3fa1a84f1c1d5c859ea7d6df44b39c7d5b81390b96d6e8c247d8234e1fd4bfee

See more details on using hashes here.

File details

Details for the file bean_rs-0.3.1-pp310-pypy310_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for bean_rs-0.3.1-pp310-pypy310_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 26041572cf6b29d4c6acc14356fbece746ed66a679abed99458509575ff33cf3
MD5 37799907ba6835b4c029c07acb07eec2
BLAKE2b-256 a60409595ecc4bd624b3b30738e2fd1ac35644f8ff3d3ed5fdeb79c53c07945e

See more details on using hashes here.

File details

Details for the file bean_rs-0.3.1-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for bean_rs-0.3.1-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 a7133e99773bb7624b5764fea2e0defbd164cc45d9963794fc6feb329ab9f9ca
MD5 d5660cf247adf9308eb93e33f85a955a
BLAKE2b-256 0fa0da216625649947503ebf29120737e8a3c16ac953b3e94e50423ccd8b8508

See more details on using hashes here.

File details

Details for the file bean_rs-0.3.1-cp312-none-win_amd64.whl.

File metadata

File hashes

Hashes for bean_rs-0.3.1-cp312-none-win_amd64.whl
Algorithm Hash digest
SHA256 29c9a6b5cf71964944076c82e8cd58e2997f2cde55e08fd9ce0232fc95f75664
MD5 d176742e7f69880cdb6eb373753eadfe
BLAKE2b-256 6c92c76d167dd5df635d689fc564238f0abac65ec24e838e5b1679b861e803b7

See more details on using hashes here.

File details

Details for the file bean_rs-0.3.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for bean_rs-0.3.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 db3f55f43d5834566732239e0b8eb88c142d6efd9fee56d1f5972a1db9dbad93
MD5 79599f6c0d3a1f58db8569fd579de524
BLAKE2b-256 10dff36f9b9519d40101009085b817988dc7031b4cfffba4910fbae397a6cd77

See more details on using hashes here.

File details

Details for the file bean_rs-0.3.1-cp312-cp312-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for bean_rs-0.3.1-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 eb711b435938c1500344c766fdcce20115dfd31b37efad5a4ccc66d491d8bf2c
MD5 f17463784fd61c27aa225b15fef80bbd
BLAKE2b-256 291196d6dc056e6c5fde199cb4fbc18842d936bb1963c6f74d2231b6d1902c7a

See more details on using hashes here.

File details

Details for the file bean_rs-0.3.1-cp311-none-win_amd64.whl.

File metadata

File hashes

Hashes for bean_rs-0.3.1-cp311-none-win_amd64.whl
Algorithm Hash digest
SHA256 a0d8aa38163411fe9694b67984bf2033c9b586ed45209b46864e0e36c63ec095
MD5 ee57e542457c22927e460eff3bed2e4b
BLAKE2b-256 7dd4ac12efd40d406bb35594b519b0f6ae9ed39cdf2108f3a3ebc9ddb4ff5b99

See more details on using hashes here.

File details

Details for the file bean_rs-0.3.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for bean_rs-0.3.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 70066cd6eb8abae7067819803b69d29b87de4e855a6da14fc24e987c7cbbc041
MD5 ffab19357cbcb839d31112c40d0c79d8
BLAKE2b-256 b2406813e852ffbf2ceaf804715fbdb179ab2bdb6d700795443fe9754bf352e4

See more details on using hashes here.

File details

Details for the file bean_rs-0.3.1-cp311-cp311-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for bean_rs-0.3.1-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 74ecaa45567ffad11de26b4559a2c04ef2ebed7938f0d547783c99862696813c
MD5 6e902a76d7704a9679411748792dcec5
BLAKE2b-256 d59d7358d38985ee24bd82e660b7954fabc1c1dba6ca1166502382936c2eab88

See more details on using hashes here.

File details

Details for the file bean_rs-0.3.1-cp310-none-win_amd64.whl.

File metadata

File hashes

Hashes for bean_rs-0.3.1-cp310-none-win_amd64.whl
Algorithm Hash digest
SHA256 fd501f9957347108d07cc905820600f0813ce8fc35a76bac33b9d9954783d853
MD5 0ff645ee2ee058f49aff201924bcf4e3
BLAKE2b-256 5bddbac0037f567f404f78ca386187c6c9db356aa0191f5e7ad00e87ac36d56d

See more details on using hashes here.

File details

Details for the file bean_rs-0.3.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for bean_rs-0.3.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 dfc912fc000f33b98ee428999cd3e760c59666154249a031687d4ced41aa48ae
MD5 593c1f105536e7caeb6b89387a77aa7e
BLAKE2b-256 f04b96bc74ac3dd9d926e3b4cf78b2ed65b9d51ab202de4043b567f56c37c225

See more details on using hashes here.

File details

Details for the file bean_rs-0.3.1-cp39-none-win_amd64.whl.

File metadata

File hashes

Hashes for bean_rs-0.3.1-cp39-none-win_amd64.whl
Algorithm Hash digest
SHA256 0eac6a5962329d22f69cc7adf1a0e46b4e3825a3ac73e6a8cf427851d54c8e08
MD5 48e95bfbe31c1dbd44f1cd378aac1eac
BLAKE2b-256 895458f232fe981d4bc7d205c406fd17f8a2e206a266f53fc3a321c20515be4b

See more details on using hashes here.

File details

Details for the file bean_rs-0.3.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for bean_rs-0.3.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 5924a183ee2b3e30db2c6f82fb6227489b350ff53d27a24b99250367f1e6d6de
MD5 b92a87e0763d10c36de2c6924e20e95d
BLAKE2b-256 f1b678280a100ed77dbba5247ad9375b643b3596b41187d937f9818cce895acd

See more details on using hashes here.

Supported by

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