Learn Python • #12 Final Project • Build an Expense Tracking App!
HTML-код
- Опубликовано: 25 июн 2024
- In the final project of this Python beginner course, we'll build a personal expense tracking app from scratch.
With this app, you'll learn how to get expense data from a user (via the terminal), save and categorize that expense into a spreadsheet. This project will take about an hour, and will test all of the Python skills you've learnt so far.
You'll learn how to plan, structure and implement a project all the way from an idea to a finished product - as well as seeing how you can solve new and unexpected problems.
🔗 Project Code (GitHub): github.com/pixegami/python-fo...
🔗 Full Playlist: • Python For Beginners (...
👉 Follow me on Twitter: @pixegami
📚 Chapters
00:00 - Introduction
02:55 - Project Specs: Expense Tracker
06:30 - Create an "Expense" Class
07:55 - Main Project Structure
13:27 - Getting User Expenses
30:58 - Saving Expenses to a File
36:14 - Summarise All Expenses
43:54 - Group Expense By Category
49:07 - Track Remaining Budget
56:46 - Wrapping Up
I'm a Python beginner and I was able to follow the video and understand every part. You are really good at this and deserve more views!
Thanks! I'm really happy to hear that since that's exactly who (Python beginners) I made the videos for!
I understand that your videos may not receive as many views as others on RUclips, despite their quality. The platform is saturated with Python experts who prioritize producing simplistic, low-quality code that is easily digestible for a larger audience. However, I personally choose to watch your channel because I am interested in enhancing my Python programming skills, rather than simply seeking elementary level content that garners high viewership on the platform.
Thanks! I really appreciate that. I think everyone has a different way of learning, so I made these videos based on the way I'd like to have been taught when I first started.
This video is so thorough, clear and practical. I really appreciate that you take the time to explain the whole process of building a program from scratch, not just what each line of code means, but also the design logic the whole way through, from the program blueprint to the design of each function block, and, how you would handle new problems that come up. It was very helpful and a great pleasure to follow along. Thank you so much.
Thank you for your comment and feedback :) I do think that building software is more than just the code, but also about the design and strategy of the program as well. I'm grateful that you appreciate it, and glad to hear it was helpful :)
These are the best tutorials on YT but I hope we’ll get more of these long form content in the future.
Thank you! The longer projects take a lot of time and energy to do, but I really do enjoy working on them. I definately plan to do a lot more, but just need to pace myself a bit :)
Excellent tutorials, clear explanations, and high-quality videos. Rare combination these days
Thank you!
can you tell me what all libraries he used in the video as i am also a beginner its being little confusing for me
Would love to see you make more project tutorials like this! Maybe increasing in difficulty?
Great idea - stay tuned :)
Thanks for your channel dude. It’s really good stuff.
That was a really great series! Thank you!
Glad you enjoyed it!
Thank you for this, I'm only in my second month of learning how to program and this was extremely helpful. I've been wanting to build one of these for myself for a few weeks and this is the best one I've found so far!
Glad to hear that! If you're already building this 2 months in, you're doing a fantastic job! :)
Thank you for this insightful tutorial on building an Expense Tracking App using Python! It was clear, practical, and immensely helpful.
Really great to hear it was helpful :)
Dear Sir,
You have explained all the concepts thoroughly. The language you used is understandable.
Basically class, def. function and storing and calling the data all these concepts are clearly explained. Thanks a lot for your efforts taken. I would like to learn from you about making desktop application using python/Tkinter or any other tool....
tanks and regards......
Thanks, it was nice explanation
I found a suggestion for this for programing project ideas from Coding from Lewis, this is the best tutorial I've been able to find that actually explains how stuff works!
Also, is it possible to have this track income as well?
Thanks for your comments :) Glad you enjoyed it. Tracking income is possible (anything is possible when you're building it!) but out of scope for this project.
But if you wanna implement it - you need to first decide where the data source is from. Somewhere online? A file you drop into the folder? Manual input? Then write the Python code to read and store that data.
@@pixegami Ah thank you, I've been experimenting with the file to no avail. I'll try again with something similar to what's in the video.
Amazing tutorial! Thank you for the perfect explanation. Please keep uploading more. Subscription and like are granted!👍
Thank you! More to come :)
What commands do you use for the emojis, and thanks to you i've enjoyed learning to code!
Thank you soooo much..... it was very helpful and i nearly revised my entire syllabus with this🙌😅.
Great work sir! I enjoyed making it actually and had kind of satisfaction at the result in end😃🤝
I love reading these types of comments! Glad it was helpful and glad you enjoyed it :)
just finished your python courses serie. Thank you very much. I really recommend this serie to anyone that want to start or already has basics on python. Very useful courses !
Awesome, thank you! Glad you enjoyed it :)
Nice 👍, I was just passing and your video was so interesting that you just gained a new follower(me).
I'm a beginner in python programming
Thank you! Welcome aboard, and enjoy your journey!
Great videos
Thanks!
Thanks, this is great.. now how do i load this to a web page ... i hope i get over this and start doing android apps
Thank you
You're welcome!
Goood🎉🎉 what is next ?? Can you make django course it will be good thing with real project
I haven't used a lot of Django since I mostly use a NextJS, serverless stack for apps. But I have a lot of ideas for future projects. Stay tuned!
Hello sir. Thanks so much for this. For making knowledge available to us for free.we are grateful. Sir I want to ask, is it possible to use kivy to turn this into an android app with GUI?
You're welcome! Glad to hear it's helpful. I've never used Kivy before, so I don't know how easy/hard it is to make an Android app with it.
However, I can say for sure that Kivy isn't widely used for app production. In my experience, I think it's easier to actually learn the right/popular framework for the job - so for Android, that would be something like Flutter, Android studio or React Native. Even if you have to learn a new language/framework, you'll have a better experience in the long term because of all the support and examples available.
Is there a good python API recommended for pulling expenses from an account? Trying to automate the data into a spreadsheet. (I've looked at Plaid so far)
Good question, I haven't looked into this myself yet. Let me know if you find one. I guess it'll be a challenging problem since it's bank dependant, and likely under high security as well.
As a beginner im really enjoying this tutorial sir. My terminal is blank at 13:14. Not sure why?
I love the video and the project. Any tips on how to get the color / pretty emojis on VS Code / Python 3.9.2 on Ubuntu 20.04 LTS?
Thanks for your work.
Thank you! In VSCode (and in Unix terminals), I think emojis should just show up like any other unicode character. In Ubuntu I think you can bring up the Emoji keyboard like so: askubuntu.com/questions/1045915/how-to-insert-an-emoji-into-a-text-in-ubuntu-18-04-and-later
This was really helpful, the little steps adding up to the big picture was perfect and did a great job in helping me understand the logic of the various steps; which is in fact, very important.
However, I ran into a few problems when writing into the .csv file. The code ran quite alright, but at the end, I got an error message, a “UnicodeEncodeError”
UnicodeEncodeError: ‘charmap’ codec can't encode character ‘\U0001f35a’ in position 14: character maps to
This exception makes it impossible for the changes to be saved to the csv file, how do I go about resolving this, please?
Thank you! Seems like you have an emoji in the text somewhere that isn't getting encoded properly. I typed the error into ChatGPT and got quite some useful tips: e.g. change the encoding of the csv file to utf-8. Like: "with open('output.csv', 'w', encoding='utf-8')". Or if it doesn't work, you can try removing the emojis.
Is this something I could incorporate using Flask and jinja2?
Sure, but it's a little out of scope for the beginner series. But yes, you can pretty much take this whole program and put it into a Flask or Django app if you wanted.
I am very curious about what keyboard you use, would be really awesome if you can tell me
I currently use a K2 keyboard with blue switches. But I actually swap keyboards quite a lot 🤷♂️
@@pixegami Wow the keyboard in this video does not sound like blue switches at all
@@NH-st2uh Hmm, if it's not the blue switches, then it might be Red (I use those too).
@@pixegami Ohh alright, thank you for answering
Yo I need some help here, the csv file doesn't appear at all.
how did you get emojis??
I'm on a Mac and there's a shortcut to open the Emoji keyboard (Ctrl + Cmd + Space). There's one for Windows too: Windows key + . (period) or Windows key + ; (semicolon).
Emojis are just normal unicode characters to Python, so they will show up in VSCode or your terminal just as any other letter would!
35:18
34 : 33
Expense() takes no arguments
this is the error im getting,what to do?
Hmm, what does your code look like? And which part of the video is it referring to?
Can someone help with the object output
What issue are you having with it?
i am beginner that's why i have so many doubts what should i do?
Take your time, build small projects, and write a lot of code :)
@@pixegami thanks sir to motivate me
Ake a python project on personal finance traker
Source code link ??
The entire course is linked in the comment section. The project code specifically is here in this folder: github.com/pixegami/python-for-beginners/tree/main/12%20-%20Final%20Project
Thank You Sir ❤@@pixegami
How do we connect the code to the database
There's lots of different ways you can do it. Here's one video to do it with serverless DB on AWS: ruclips.net/video/CjVPMocEECM/видео.html
Hello
hello i keep getting “value error could not convert string to float amount=float(expense_amount)” it works but then it breaks i have try and except but i still want the budget to print still if it breaks how can i do that ?
You can wrap it in a "try" statement.
try:
amount=float(expense_amount)
except Exception as e:
print(f"Cannot convert {expense_amount} to float")
This will try to execute that conversion. If it fails, it will go into the code block under the "except" statement and let you print the value.
@@pixegami yes i set the amount to zero in the except block and i got it working
Expense() takes no arguments
this is the error im getting,what to do? Minute 30.58. I got a Traceback (most recent call last):
File ~/anaconda3/lib/python3.11/site-packages/spyder_kernels/py3compat.py:356 in compat_exec
exec(code, globals, locals)
File ~/expenses.tracker.py:67
main()
File ~/expenses.tracker.py:17 in main
print(expense)
File ~/expense.py:17 in __repr__
return (f'')
ValueError: Unknown format code 'f' for object of type 'str'
The "ValueError" tells me that your "self.amount" is not a float but a str. I'm not sure if that will entirely fix your problem, but I think I'd have to see the full code for that.