Package: pybudgetplot
PyBudgetPlotCI/CDPackageMetaTable of ContentsIntroductionOverviewInstallationUsageCLI CommandsLicenseIntroductionThis project was inspired by the"Personal finance with Python"book.It'll help you to get the answers to the following list of questions (and more):I want to visit Greece during September, will I have saved-up enough to go?I want to buy a car, but how much time do I need to save-up with my lifestyle?What about if I change my current lifestyle a bit?Got offered a slightly better salary than my current, should I take it or not?I'll have different expenses, what's the total net-worth change then?Are those 200 bucks change in salary worth the trouble at all?What about if I work somewhere for smaller salary but fewer expenses too?I want to lead the following lifestyle, how much money should I earn to do so?Any other question concerned about how-much money you'll have on a given date.While"some logic"from the"Personal finance with Python"book is reused,the source-code and the contents of the produced outputs arequite different.OverviewAll the project's functionality revolves around a'budget-definition'file.Thedefinitionfile is used for storing thebudget datain YAML format.Thebudget dataconsists of two components:PeriodRepresents list of all dates that fall in thescopeof thebudget.Defined by astart-dateand anend-datevalues in ISO-format.EventsRepresents list ofrecurringevents ofspending or receiving money.EachEventis defined bydescription,amountandfrequency.Thedefinitionfile is used as input for the following operations:Calculation ofdailyandcumulativetotals for each date in the period.The output can be saved as CSV or dynamic XLSX file that's using formulas.Plotting (line-chart) graph visualization of the daily and cumulative totals.The output can be saved as PNG or aninteractiveplotter can be opened.Two budgets and their outputs are included in the'examples'dir.The difference between 1300 and 1500 salary in the long-term can be surprising.InstallationThe project can be installed from PyPI using the following commands:# Windows - open admin-level CMD and run:pipinstallpybudgetplot# Linux / MacOS - open user-level Terminal and run:pip3install--userpybudgetplotUsage1. Init a sample budget-definition file.# generates budget.yaml file in the current dirbudgetinitbudget.yaml2. Update the file as per your needs and save the changes.3. Generate outputs in one or all of the supported formats.# generates budget.csv, budget.png, budget.txt, budget.xlsx files in current dirbudgetplot-c-p-t-xbudget.yamlCLI Commands# ------------------------------------------------------------------------------# see the 'budget' command help# ------------------------------------------------------------------------------>budget-hUsage:budget[OPTIONS]COMMAND[ARGS]...CompositeCLIcommandformanaginga'budget-definition'file.Options:--versionShowtheversionandexit.-h,--helpShowthismessageandexit.Commands:initInitializeabudgetdefinitionfilewithsamplecontents.plotPlotabudget-definition.yamlfile.# ------------------------------------------------------------------------------# see the 'budget init' command help# ------------------------------------------------------------------------------>budgetinit-hUsage:budgetinit[OPTIONS][FILE]Initializeabudgetdefinitionfilewithsamplecontents.Options:-h,--helpShowthismessageandexit.# ------------------------------------------------------------------------------# see the 'budget plot' command help# ------------------------------------------------------------------------------>budgetplot-hUsage:budgetplot[OPTIONS]YAML_FILEPlotabudget-definition.yamlfile.Options:-c,--csvWrite.CSVwiththebreakdownnexttodefinitionfile.-p,--pngWrite.PNGwiththegraphnexttodefinitionfile.-t,--txtWrite.TXTwiththebreakdownnexttodefinitionfile.-x,--xlsxWrite.XLSXwiththebreakdownnexttodefinitionfile.-i,--interactiveEnterinteractiveplotmode.-h,--helpShowthismessageandexit.# ------------------------------------------------------------------------------# That's all folks!# ------------------------------------------------------------------------------Licensepybudgetplotis distributed under the terms of theMITlicense.