hledger-budget


Namehledger-budget JSON
Version 1.2.0 PyPI version JSON
download
home_pageNone
SummaryWrapper script for 'hledger balance --budget' report.
upload_time2024-06-06 23:07:30
maintainerNone
docs_urlNone
authorMichal Goral
requires_python<4.0,>=3.10
licenseGPL-3.0
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # hledger-budget

hledger-budget is a wrapper for for `hledger balance --budget` report which
helps maintaining envelope-style budgeting while using goal-based
capabilities for budgeting in hledger.

## Introduction

With envelope-style budgeting one divides available spending money into
"envelopes" which represent spending categories. For example, there may be a
separate envelope for groceries, bills, entertainment and so on. With
[ledger](https://ledger-cli.org/) and [hledger](https://hledger.org) accounts
and subaccounts serve a role of envelopes.

There are 2 typical approaches for ledger and hledger for envelope-style
budgeting:

- by using subaccounts for your main checking account (for example
  `assets:bank:checking:groceries`, `assets:bank:checking:bills` and so on;
- by using virtual accounts (and possibly automated transactions).

hledger-budget proposes a different approach: using goal-based budgeting from
hledger. With hledger you use periodic transactions to set budgeting goals
against "expenses" accounts and track these expenses. One thing which many
hledger tutorials often omit, but which enables periodic transaction for
fluid envelope-stype budgeting, is that "periodic" transactions don't have to
be periodic at all. This gives flexibility necessary for effective
envelope-style budgeting and simplicity of budgeting recurring expenses.

To efficiently use goal-based budgeting as envelope-style budgeting, bare
hledger misses necessary tools, which hledger-budget provides:

- ability to verify how much of available money is not yet budgeted and if
  we're not over-budgeting;
- easy way to forecast whether there's still enough money to cover all
  budgeted expenses;
- how much money each expenses category has budgeted (hledger aggregates
  budgets of subaccounts in parent accounts).

### Example

```ledger
~ monthly from 2024-01
    (expenses:groceries)        200.00 EUR
    (expenses:bills)            300.00 EUR
    (expenses:car:fuel)         100.00 EUR

~ monthly from 2024-03-10
    (expenses:other)             50.00 EUR

~ 2024-03-05
    (expenses:car:repairs)      150.00 EUR
    (expenses:trips)            400.00 EUR
```

This is example budget, which you can keep in a separate file included in
your journal file, or directly in journal file. It uses non-balancing virtual accounts
which are only used for hledger's budget reports; alternatively you could
also project your income and balance expenses against it).

This budget sets 2 automatic budgets:

1. for groceries, bills and car fuel which occurs on the first day of each
   month;
2. for "other" expenses which occurs on the 10th day of each month.

By default hledger-budget takes into account budgets from the beginning of
current month to the current day. This means that hledger-budget won't
account the budget for "other" before 10th day of current month. This is
useful for example when you get your salary ~10th of each month. You may
include or exclude such budget postings by changing the time period of
hledger-budget reports with `-b`, `-e` and `-p` switches. Somewhat
counterintuitively, reports with `-p 'this month'` will create reports for
whole months, including the future.

Additionally, there's a one-time envelope-style budget for car repair and for
a trip.

## Current Budget

`hledger-budget balance` provides a similar table for a current budget as
`hledger --budget`, but with deaggregated budgets for all accounts. It means
that you'll only see money which you explicitly assigned to each "envelope".

hledger-budget makes no assumptions here and shows all accounts for which
budget is defined. You may exclude your "spending" accounts from the report,
because they affect the total spendings which report presents. For example,
if you track transactions like this:

```ledger
2024-02-01 Groceries
    expenses:groceries          10.00 EUR
    assets:bank:checking       -10.00 EUR
```

you may want to use `hledger-budget balance -x assets:bank:checking`.

## Budget Verification

`hledger-budget check` compares your budgets for each month against the money
available on one or more "spending" accounts. For example, to see the report
for current month, you may use `hledger-budget check assets:bank:checking`.

The report automatically verifies the validity of your budget:

- whether there's enough of money for all remaining (budgeted) spendings;
- whether you're not over-budgeting.

## Output Formats

hledger-budget prints pretty tables by default, but there are more formats
which it can output. Format is controlled with `-O` switch and it accepts the
following values: `rich` (default), `csv`, `html`, `html-bare`.

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "hledger-budget",
    "maintainer": null,
    "docs_url": null,
    "requires_python": "<4.0,>=3.10",
    "maintainer_email": null,
    "keywords": null,
    "author": "Michal Goral",
    "author_email": "dev@goral.net.pl",
    "download_url": "https://files.pythonhosted.org/packages/fc/b6/6b48e68fa25cd7c3f5ca2a7d5c59d806601faf49525c2a2410bdb5c10107/hledger_budget-1.2.0.tar.gz",
    "platform": null,
    "description": "# hledger-budget\n\nhledger-budget is a wrapper for for `hledger balance --budget` report which\nhelps maintaining envelope-style budgeting while using goal-based\ncapabilities for budgeting in hledger.\n\n## Introduction\n\nWith envelope-style budgeting one divides available spending money into\n\"envelopes\" which represent spending categories. For example, there may be a\nseparate envelope for groceries, bills, entertainment and so on. With\n[ledger](https://ledger-cli.org/) and [hledger](https://hledger.org) accounts\nand subaccounts serve a role of envelopes.\n\nThere are 2 typical approaches for ledger and hledger for envelope-style\nbudgeting:\n\n- by using subaccounts for your main checking account (for example\n  `assets:bank:checking:groceries`, `assets:bank:checking:bills` and so on;\n- by using virtual accounts (and possibly automated transactions).\n\nhledger-budget proposes a different approach: using goal-based budgeting from\nhledger. With hledger you use periodic transactions to set budgeting goals\nagainst \"expenses\" accounts and track these expenses. One thing which many\nhledger tutorials often omit, but which enables periodic transaction for\nfluid envelope-stype budgeting, is that \"periodic\" transactions don't have to\nbe periodic at all. This gives flexibility necessary for effective\nenvelope-style budgeting and simplicity of budgeting recurring expenses.\n\nTo efficiently use goal-based budgeting as envelope-style budgeting, bare\nhledger misses necessary tools, which hledger-budget provides:\n\n- ability to verify how much of available money is not yet budgeted and if\n  we're not over-budgeting;\n- easy way to forecast whether there's still enough money to cover all\n  budgeted expenses;\n- how much money each expenses category has budgeted (hledger aggregates\n  budgets of subaccounts in parent accounts).\n\n### Example\n\n```ledger\n~ monthly from 2024-01\n    (expenses:groceries)        200.00 EUR\n    (expenses:bills)            300.00 EUR\n    (expenses:car:fuel)         100.00 EUR\n\n~ monthly from 2024-03-10\n    (expenses:other)             50.00 EUR\n\n~ 2024-03-05\n    (expenses:car:repairs)      150.00 EUR\n    (expenses:trips)            400.00 EUR\n```\n\nThis is example budget, which you can keep in a separate file included in\nyour journal file, or directly in journal file. It uses non-balancing virtual accounts\nwhich are only used for hledger's budget reports; alternatively you could\nalso project your income and balance expenses against it).\n\nThis budget sets 2 automatic budgets:\n\n1. for groceries, bills and car fuel which occurs on the first day of each\n   month;\n2. for \"other\" expenses which occurs on the 10th day of each month.\n\nBy default hledger-budget takes into account budgets from the beginning of\ncurrent month to the current day. This means that hledger-budget won't\naccount the budget for \"other\" before 10th day of current month. This is\nuseful for example when you get your salary ~10th of each month. You may\ninclude or exclude such budget postings by changing the time period of\nhledger-budget reports with `-b`, `-e` and `-p` switches. Somewhat\ncounterintuitively, reports with `-p 'this month'` will create reports for\nwhole months, including the future.\n\nAdditionally, there's a one-time envelope-style budget for car repair and for\na trip.\n\n## Current Budget\n\n`hledger-budget balance` provides a similar table for a current budget as\n`hledger --budget`, but with deaggregated budgets for all accounts. It means\nthat you'll only see money which you explicitly assigned to each \"envelope\".\n\nhledger-budget makes no assumptions here and shows all accounts for which\nbudget is defined. You may exclude your \"spending\" accounts from the report,\nbecause they affect the total spendings which report presents. For example,\nif you track transactions like this:\n\n```ledger\n2024-02-01 Groceries\n    expenses:groceries          10.00 EUR\n    assets:bank:checking       -10.00 EUR\n```\n\nyou may want to use `hledger-budget balance -x assets:bank:checking`.\n\n## Budget Verification\n\n`hledger-budget check` compares your budgets for each month against the money\navailable on one or more \"spending\" accounts. For example, to see the report\nfor current month, you may use `hledger-budget check assets:bank:checking`.\n\nThe report automatically verifies the validity of your budget:\n\n- whether there's enough of money for all remaining (budgeted) spendings;\n- whether you're not over-budgeting.\n\n## Output Formats\n\nhledger-budget prints pretty tables by default, but there are more formats\nwhich it can output. Format is controlled with `-O` switch and it accepts the\nfollowing values: `rich` (default), `csv`, `html`, `html-bare`.\n",
    "bugtrack_url": null,
    "license": "GPL-3.0",
    "summary": "Wrapper script for 'hledger balance --budget' report.",
    "version": "1.2.0",
    "project_urls": null,
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "dd2d7240bea51f0b604835d4deee46cc7ce16c89ee055f4a5483d1a51236df9b",
                "md5": "1332ef2c102ddf9033b1ad71754c547a",
                "sha256": "376cbd27153d20d415bd3de6e49a8914d20a8db715afe316a0faa308f9ab5860"
            },
            "downloads": -1,
            "filename": "hledger_budget-1.2.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "1332ef2c102ddf9033b1ad71754c547a",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": "<4.0,>=3.10",
            "size": 28039,
            "upload_time": "2024-06-06T23:07:28",
            "upload_time_iso_8601": "2024-06-06T23:07:28.967759Z",
            "url": "https://files.pythonhosted.org/packages/dd/2d/7240bea51f0b604835d4deee46cc7ce16c89ee055f4a5483d1a51236df9b/hledger_budget-1.2.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "fcb66b48e68fa25cd7c3f5ca2a7d5c59d806601faf49525c2a2410bdb5c10107",
                "md5": "44c75466709b2685be9e9c221d82fa04",
                "sha256": "1669c2986c92417789a81273d785b847029b8c81ccb31ddc0863d24e84bba1ce"
            },
            "downloads": -1,
            "filename": "hledger_budget-1.2.0.tar.gz",
            "has_sig": false,
            "md5_digest": "44c75466709b2685be9e9c221d82fa04",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": "<4.0,>=3.10",
            "size": 24840,
            "upload_time": "2024-06-06T23:07:30",
            "upload_time_iso_8601": "2024-06-06T23:07:30.706138Z",
            "url": "https://files.pythonhosted.org/packages/fc/b6/6b48e68fa25cd7c3f5ca2a7d5c59d806601faf49525c2a2410bdb5c10107/hledger_budget-1.2.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-06-06 23:07:30",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "lcname": "hledger-budget"
}
        
Elapsed time: 0.74632s