Skip to main content

Utils for beancount plugin writers - BeancountError, mark, metaset, etc.

Project description

Beancount Plugin Utils

PyPI - Version PyPI - Downloads PyPI - Wheel License Linting

A collection of utils for writing beancount plugins:

  • BeancountError & utils - throw anywhere RuntimeError and have nice error output instead of crashing beancount.
  • marked - introduce an abstraction of mark to liberate user to use any of: tag, tx meta, posting meta.
  • metaset - abstraction over meta dict to have multiple values for the same key.
  • merge_postings - merge postings with equal account names.
  • parse_config_string - parse config string.

Also see test framework and feel free to copy it.

Note: NOT READY FOR PUBLIC YET, STILL MIGRATING MY OWN PLUGINS. ANYTHING CAN CHANGE WITHOUT NOTICE.

Install

  1. Add beancount_plugin_utils to your plugin's requirements.txt file or pyproject.toml file.
  2. Reinstall your dependencies.

Tests

If the examples above do not suffice your needs, check out the tests. They consist of human-readable examples for more specific cases.

Development

Please see Makefile and inline comments.

Feel free to PR your utils to add them to this repro.

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

beancount_plugin_utils-0.0.4.tar.gz (10.3 kB view hashes)

Uploaded Source

Built Distribution

beancount_plugin_utils-0.0.4-py3-none-any.whl (25.0 kB view hashes)

Uploaded Python 3

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