Locked learning resources

Join us and get access to thousands of tutorials and a community of expert Pythonistas.

Unlock This Lesson

Locked learning resources

This lesson is for members only. Join us and get access to thousands of tutorials and a community of expert Pythonistas.

Unlock This Lesson

Expense Tracker

Here are examples of file managers you can use for inspiration:

  • Buddi: Personal budget software for the rest of us
  • GnuCash: Free accounting software

Here are resources that you can use to build your file manager:

00:00 And the final project: Expense Tracker. We all have expenses from day to day, whether it’s grocery, clothing, fuel, and other bills. There are so many that it’s easy to lose track of them and not keep an eye on where all the money’s going. An expense tracker can help with this.

00:17 A tracker allows users to log their expenses and categorize them, providing some totals for each category and allowing analysis of these expenditures. With a more advanced tracker, it’s possible to perform in-depth analysis of spending and ensure that you’re keeping within set budgets and making better financial decisions.

00:36 Let’s take a look at a single example of an expense tracker in action. Here, you can see GnuCash in action. Adding an expense is done by clicking on the relevant category…

00:50 entering what the expense is…

00:57 and now we can see has been entered. Quick and easy.

01:01 Let’s look at some of the technical challenges you’ll face in creating your expense tracker. Firstly, input and categorization, and also storage. The core of this application is the input, storage, and recall of expenses, so naturally, a database will be central to its operation.

01:19 You’ll need to spend some time designing the database appropriately so that it can store all of the information you need in a manner that you can access later on for analysis. Providing an interface which allows the quick input and categorization of expenses here is important.

01:34 Otherwise, the app won’t get used if it’s difficult to enter the data. Secondly, analysis of data. pandas provides a huge range of data analysis options and can make short work of enormous amounts of data.

01:47 The expense tracker should offer analysis over different time periods, and pandas can achieve this quickly and easily. If you’re not up to speed on pandas, Real Python has a wide range of courses to get your skills up to par to allow analysis within this project.

02:02 Display of data, using a library such as matplotlib. Visual representations of data are often more approachable than raw numbers, allowing trends to be quickly seen and appreciated. matplotlib allows creation of graphs from pandas data in a wide range of styles, which can be customized whenever necessary.

02:22 Now, let’s take a look at some of the extra challenges you could take on with your expense tracker project. Firstly, reminders and scheduling. It’s easy for this sort of task to slip the mind of a user, so setting reminders and scheduling of entries would be a worthwhile addition—again, possibly using a notification API to remind the user, even if they’re not at the computer. Finally, analysis of trends.

02:47 Data analysis is a popular subject in the Python world as there are so many libraries which are fundamental for this kind of work. Once there is a large enough corpus of data, the application could perform analysis on trends in spending, providing more insight for the user into their habits.

Become a Member to join the conversation.