{"id":20202891,"url":"https://github.com/carderne/bean-rs","last_synced_at":"2025-04-10T11:41:36.543Z","repository":{"id":218064922,"uuid":"743164068","full_name":"carderne/bean-rs","owner":"carderne","description":"beancount clone in Rust","archived":false,"fork":false,"pushed_at":"2024-11-28T16:07:23.000Z","size":86,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-24T10:37:47.282Z","etag":null,"topics":["accounting","beancount","plaintext-accounting"],"latest_commit_sha":null,"homepage":"https://crates.io/crates/bean-rs","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/carderne.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-01-14T14:28:10.000Z","updated_at":"2024-11-28T16:07:28.000Z","dependencies_parsed_at":"2024-04-15T22:45:47.818Z","dependency_job_id":"22e58e95-c076-44a0-acae-fb69062c61a7","html_url":"https://github.com/carderne/bean-rs","commit_stats":null,"previous_names":["carderne/beaners","carderne/beanrs"],"tags_count":11,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/carderne%2Fbean-rs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/carderne%2Fbean-rs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/carderne%2Fbean-rs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/carderne%2Fbean-rs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/carderne","download_url":"https://codeload.github.com/carderne/bean-rs/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248211121,"owners_count":21065674,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["accounting","beancount","plaintext-accounting"],"created_at":"2024-11-14T04:58:41.492Z","updated_at":"2025-04-10T11:41:36.521Z","avatar_url":"https://github.com/carderne.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# bean-rs\n\n**Project paused until [this PR in PyO3](https://github.com/PyO3/pyo3/pull/4135) (or something similar) gets merged.**\n\nBasic [beancount](https://github.com/beancount/beancount) clone (one day...) in Rust!\n\nStill very very alpha and doesn't do most things that are necessary to be at all useful.\n\nPython bindings are a WIP using [PyO3](https://pyo3.rs);\n\nThe libraries:\n- Rust: [crates/bean-rs](https://crates.io/crates/bean-rs)\n- Python: [pypi/bean-rs](https://pypi.org/project/bean-rs/)\n\nPlanned features:\n- [x] Parse beancount files using [pest](https://pest.rs/)\n- [x] Stricter transaction keywords\n- [x] Propagate line numbers for debugging\n- [x] Calculate account balances\n- [x] Use proper Decimal handling\n- [x] Validate transactions against `open`/`close` directives\n- [x] Validate `balance` directives\n- [x] Pad statements\n- [x] Open/close with multiple currencies\n- [x] Add Python bindings\n- [ ] Support `includes`\n- [ ] Come up with a more punny name\n- [ ] Currency conversions\n- [ ] Price/cost and FIFO\n\n## (Deliberate) differences from beancount\n- Postings can't omit the currency\n\n## Use from Rust\n### Install\n```bash\ncargo install bean-rs\n```\n\n### Run\n```bash\n$ bean-rs\n\nUsage: bean-rs \u003cCOMMAND\u003e\n\nCommands:\n  balance  Display account balances\n  check    Check for errors and quit\n  help     Print this message or the help of the given subcommand(s)\n\nOptions:\n  -h, --help     Print help\n  -V, --version  Print version\n```\n\n#### Calculate balances\n```bash\nbean-rs balance example.bean\n```\n\n## Use from Python\nMore to come...\n```python\nimport bean_rs\nledger = bean_rs.py_load(\"example.bean\")\nprint(ledger.opts)\n```\n\n## Development\n### Build\n```bash\nmake build\n```\n\n### Test\n```bash\nmake test\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcarderne%2Fbean-rs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcarderne%2Fbean-rs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcarderne%2Fbean-rs/lists"}