Skip to main content

Lazy finance (lbud for "lazy budget")

PyPI version

lbud aims to help building an easy, data-driven budget solution for personal use.

For examples of data, see example-data/.

Install

Install the published package with uv tool install lazy-budget.

To install the current checkout instead of the published release:

uv tool install .

Python 3.14 or newer is required.

Development

uv sync
uv run ruff format --check .
uv run ruff check .
uv run pytest

Use uv run lbud to run the checkout. Build release artifacts with uv build.

Workflow

lbud works in a very specific way: you declare

  • the budgeting period (start and end date)
  • how much money do you have (as of the first day of the budgeting period),
  • how much do you wanna save (as of the last day of budgeting period),
  • your financial operations.

Provided with the data described above, lbud allows you to see certain statistics over time, answers to these questions:

  • How much more money can I actually spend today?
  • How much money do I spend daily on average?
  • When I spend too much money, for how many days should I limit my spendings to keep the money I set out to keep?

To start using lbud to manage your budget, you will need to create and maintain at least 2 text files.

Budget file

budget.yml is a YAML file that describes a single budgeting period. It is advised to keep the period short, but i am sure lbud can handle however long budgets. Example:

# total amount of money to use
total: 2000

# the part of the total
# that you aim to keep this month
keep: 1500

# budgeting period
start: 2021-04-25
end: 2021-05-10

# currency is optional
# USD is the default and
# the operations themselves can
# specify the currency (lbud add "-10 CAD" taxi), as well
# as the config file and CLI options
currency: USD

History file

history.csv is a CSV file that lists all of your financial operations. You may have one history file for all your budgets, history is filtered by budget period when performing calculations. It has to have following columns:

  • money_value - operation value; may include a currency in multi-currency setups, format: -10.99 CAD;
  • description - operation description; may include category, format: [category] description;
  • dttm - operation date and time, ISO format.

Example:

-10,[food] snacks,2021-04-26T00:00:00
-1.95,[food] bubblegum,2021-04-27T17:20:31
-9.95,[food] hot dog,2021-04-27T00:00:00
-3.33,donation,2021-04-28T00:00:00
-30,[medicine] cardiologist,2021-04-29T00:00:00

Use of lbud on example files

$ lbud ls
           today : 2021-05-01
      total days : 16
       days left : 9
 available / day : $31.25
 CAN spend today : $163.52
     spent today : $0.00
 avg spent / day : $7.89
            kept : $1,663.52

$ lbud add -200 "club night"

$ cat history.csv  # added operation to history file
-10,[food] snacks,2021-04-26T00:00:00
-1.95,[food] bubblegum,2021-04-27T17:20:31
-9.95,[food] hot dog,2021-04-27T00:00:00
-3.33,donation,2021-04-28T00:00:00
-30,[medicine] cardiologist,2021-04-29T00:00:00
-200,club night,2021-05-01T00:00:00

$ lbud ls
                today : 2021-05-01
           total days : 16
            days left : 9
 days until can spend : 2
      available / day : $31.25
   CANNOT spend today : $36.48
          spent today : $200.00
      avg spent / day : $36.46
                 kept : $1,463.52

$ lbud cats
      medicine : -30,00 USD
          food : -21,90 USD
 <no category> : -3,33 USD

Charts

Burndown chart

Provides a bird's eye view of how things are going with the budget.

$ lbud bd

burndown chart

Category chart

Allows to determine how much money was spent/earned by which category.

$ lbud catc

category chart

CLI help

Note: all the defaults can be pulled from a config file at ~/.lbudrc.yml. To override the location, specify LBUDRC environment variable.

lbud --help

Weird configuration stuff

There is a lot of configuration options to lbud (CLI arguments, config file, the defaults) and since it was tested and used in a very specific way, it might not work for you.

Feel free to submit a ticket or a pull request (idk if it works, i'm new to this open source thing, please post a ticket about it too).

Posting the way it is actively being used for clarity:

  • budget/history files at ~/finances/
  • config file at ~/.lbudrc.yml:
    history_file: /Users/oleksandr/finances/history.csv
    budget_file: /Users/oleksandr/finances/budget.yml
    locale: pl_PL
    currency: PLN
    
  • lbud anywhere

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

lazy_budget-0.18.0.tar.gz (13.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

lazy_budget-0.18.0-py3-none-any.whl (17.2 kB view details)

Uploaded Python 3

File details

Details for the file lazy_budget-0.18.0.tar.gz.

File metadata

  • Download URL: lazy_budget-0.18.0.tar.gz
  • Upload date:
  • Size: 13.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.32 {"installer":{"name":"uv","version":"0.11.32","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Arch Linux","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for lazy_budget-0.18.0.tar.gz
Algorithm Hash digest
SHA256 edbf79c6e22faf03efd5831da1dac86915e6b2c73b2d07155e1502c217948754
MD5 e4df389ff031c74458938a0b8b4ceeb5
BLAKE2b-256 deb498467b4e55ece93577a6d637bd956b93422ba75bad36bf539a26ac27ef93

See more details on using hashes here.

File details

Details for the file lazy_budget-0.18.0-py3-none-any.whl.

File metadata

  • Download URL: lazy_budget-0.18.0-py3-none-any.whl
  • Upload date:
  • Size: 17.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.32 {"installer":{"name":"uv","version":"0.11.32","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Arch Linux","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for lazy_budget-0.18.0-py3-none-any.whl
Algorithm Hash digest
SHA256 78970598f3eec7937b10d3e713d57a7f0c695afcab6f8344b70fe1abb6e45e26
MD5 3f3c3826e5f294e489648ea8b812d0ad
BLAKE2b-256 ef7589f027b05501d94c9fa8dfef7e4e35d9d5a0741c965721f62a5e47ed263e

See more details on using hashes here.

Release history Release notifications | RSS feed

2.2.0

2 files

2.1.1

2 files

2.1.0

2 files

2.0.2

2 files

2.0.1

2 files

2.0.0

2 files

1.2.0

2 files

1.1.0

2 files

1.0.0

2 files

0.18.1

2 files

This release

0.18.0 This release

2 files

0.17.1

1 file

0.17.0

1 file

0.16.8

1 file

0.16.7

1 file

0.16.6

1 file

0.16.5

1 file

0.16.4

1 file

0.16.3

1 file

0.16.2

1 file

0.16.1

2 files

0.16.0

1 file

0.8.0

1 file

0.7.2

2 files

0.7.1

2 files

0.7.0

2 files

0.6.0

2 files

0.5.2

2 files

0.5.1

2 files

0.5.0

2 files

0.4.2

2 files

0.4.1

2 files

0.4.0

2 files

0.3.4

2 files

0.3.3

2 files

0.3.2

2 files

0.3.1

2 files

0.2.3

2 files

0.2.2

2 files

0.2.1

2 files

0.2.0

3 files

0.1.0

1 file

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page