Module Contents




class finalynx.budget.budget.Budget(service_account_path: Union[str, pathlib.Path, None] = None)[source]




set_gspread_token_path(path: Union[str, pathlib.Path]) None[source]

Set the path to the Google Sheets token file, defaults to the OS’s default directory.

fetch(clear_cache: bool, force_signin: bool = False) rich.tree.Tree[source]

Get expenses from all sources and return a rich tree to summarize the results. This method also updates the google sheets table with the newly found expenses and prepares the list of β€œpending” expenses that need user reviews.

render_expenses() Union[rich.table.Table, str][source]
render_summary() rich.tree.Tree[source]

Render a summary of the budget, mainly the current and previous month’s totals.

interactive_review() None[source]

Review the list of pending expenses one by one, and update the sheet with the new values. This method is interactive, and will clear the console between each expense or when the user presses Ctrl+C.

_fetch_sheet_values() List[List[str]][source]

Get the latest values from the Google Sheet.