Python GUI Programming - Build a Desktop Application with Tkinter and SQLite | Shubham Sarda | Skillshare

Playback Speed

  • 0.5x
  • 1x (Normal)
  • 1.25x
  • 1.5x
  • 2x

Python GUI Programming - Build a Desktop Application with Tkinter and SQLite

teacher avatar Shubham Sarda, Python Developer

Watch this class and thousands more

Get unlimited access to every class
Taught by industry leaders & working professionals
Topics include illustration, design, photography, and more

Watch this class and thousands more

Get unlimited access to every class
Taught by industry leaders & working professionals
Topics include illustration, design, photography, and more

Lessons in This Class

34 Lessons (2h 40m)
    • 1. Course Introduction

    • 2. What is API?

    • 3. Working with CoinMarketCap API

    • 4. Fetching API Data

    • 5. Extracting API and Coin Data

    • 6. Creating Coin List & Understanding Portfolio

    • 7. Creating Portfolio Dictionary

    • 8. Calculating Profit and Loss

    • 9. GUI Introduction - Graphical User Interface

    • 10. Understanding 3 Steps Tkinter Working

    • 11. Tkinter Main Window and Labels

    • 12. Adding Header

    • 13. Adding More Data

    • 14. Improving User Interface

    • 15. Color Indication For Profit and Loss

    • 16. Adding Update Button

    • 17. Creating Executable App (.exe file)

    • 18. Databases - SQL vs SQLite3

    • 19. Introduction to SQLite3 and its Workings

    • 20. Creating Table | Working with DB Browser

    • 21. Insert Values - Databases

    • 22. Update Values - Databases

    • 23. Fetching Data From Database

    • 24. Delete Data - Database

    • 25. Creating Functions For Operation - Database

    • 26. Connecting With Database

    • 27. Fetching Data From Database

    • 28. Modifying Current Application

    • 29. Adding "Add Coin" Button

    • 30. Adding "Update Coin" - "Delete Coin" Button

    • 31. Solving Multiple Layer Issue

    • 32. Adding Notification System - Popup Box

    • 33. Adding Navigation System - Menu Bar

    • 34. Thank You For Being Here!

  • --
  • Beginner level
  • Intermediate level
  • Advanced level
  • All levels
  • Beg/Int level
  • Int/Adv level

Community Generated

The level is determined by a majority opinion of students who have reviewed this class. The teacher's recommendation is shown until at least 5 student responses are collected.





About This Class

Welcome to Building Portfolio App With Python Tkinter
This course will help you to build Python GUI project Step-by-Step with Tkinter and CoinMarketCap Free API,

Throughout the course we you will learn more about Python and Tkinter,

1. Understanding API and its usage.

2. Extracting Crypto Currency Coin Data and working with it.

3. Building portfolio logic on Command line then focusing on GUI

4. Getting started with Tkinter and Python GUI

5. Merging Command line application with Tkinter and completing .py version.

5. Converting .py application to executable .exe app.

6. Understanding basics of SQLite3 with Python

After completing this course you will be ready
to expand your knowledge over Tkinter and Python.
Enroll now and I will make sure you learn best about Tkinter!

Meet Your Teacher

Teacher Profile Image

Shubham Sarda

Python Developer


Hey there!

I've created Complete Roadmap to become a Developer with different projects, specifically for the SkillShare audience. 

With this roadmap we will start with Python Programming, learn about basics, important concepts and solve some real life problems by building projects. Once we are ready with Python, its time to gain more experience with different field projects in Automation, Data Analysis, GUI Programming and Web Development. 

Here is Complete Python Programming - 
Python A-Z: Learn Python Programming By Building Projects
Python Programming - Advanced Concepts

Python Projects - 
Python Project - Building Twitter Bot With Python and Tweepy
Python GUI Programming - Build a Desktop Application with Tkinter and SQLit... See full profile

Class Ratings

Expectations Met?
  • Exceeded!
  • Yes
  • Somewhat
  • Not really
Reviews Archive

In October 2018, we updated our review system to improve the way we collect feedback. Below are the reviews written before that update.

Why Join Skillshare?

Take award-winning Skillshare Original Classes

Each class has short lessons, hands-on projects

Your membership supports Skillshare teachers

Learn From Anywhere

Take classes on the go with the Skillshare app. Stream or download to watch on the plane, the subway, or wherever you learn best.


1. Course Introduction: Hey, guys. Welcome toe building portfolio up with Vitamin Kinter and SQL Light. This is a really interesting course in which will be taking project building approach to create our first Kinton application will be starting with very basics on I have directed the scores into many section. First will be starting with understanding off a be a taking a coin market cap, baby a start working on it state are and also start fetching some data into our command line that this terminal, Then we'll be jumping onto our main logic that is creating a port fool. You will be working towards a basic up and then create a basic command line logic to see our functionality. One status done will be start focusing on our kinter application. So will we start understanding about gender July applications and also a lot more regarding graphics will be start merging our command, line up with our kinter up, create some formatting and then create a basic executable file from our dot by file. One status done will be then focusing towards our database. We'll be using sequelae tree that is one off. The best date of is to create a simple application. So we'll be taking our cantor application, connect with our database and then start modifying functionality off Arcandor application on creator advance application. That is our final product. This is one of the most interesting project based approach towards creating our kinter application. So if you are someone who is looking towards creating a piped on project with Kingda, this is the course for you will be starting with very basics on complete whole course in a simple manner in this course will be covering everything in a simple manner from a p A to logics to our content application to our sequel light database, then to our advance Kinton application. It's a fun python project that you can add to a board for you. I hope this will be a fun journey for you to create a project with Python. So what are you waiting for? I'm really excited to see you inside 2. What is API?: Hey, guys. So come back in this lecture the stock about ebay's. So, by now, I hope you have heard about this, Tom. Maybe in some textbook, maybe in some YouTube video or maybe on something could be they are to go. So before taking any formal definition, let us take an example and understand why a pay are important and what is the main purpose off them. So let us take an example of a restaurant. You go to a restaurant on order some food, and the food is so by a waiter from a kitchen. During this whole process, you serve as a claimed. Your kitchen is us over on your waiter is your a p a. That means client want some information or some food on your server? That is, your kitchen is registered. Delivered that information that means the food. Now you need a connection between them to send a request and vigorous wants. That means you order your favorite dishes with help off EPA. That is your waiter Waiter digger, Request from you to kitchen, that is a sewer. And once the food is prepared, that is, the information is prepared. It take a response from kitchen. And so do you. That means it Deliver you the response. So you send the request and get at least once. Now why we need a p A's. Now AP eyes are really important to so multiple requests. Whenever we are going to work with a big application, you need a solid back. And that means there will be only one back. And but there can be many front ends. You might have offering 10 for you. Move my lab. That is your android up. Then you have a friend. 10 for your us up. Then you might have a website so all would be connected to a same server that have a back and as well as a database. So here all this will be connected with help off a p A. Maybe a waiter can bring a request from your move. My lab or a beta can bring a request from your us up or await again. Bring a request from your website. That means we have only once over. But we can take multiple requests and send multiple response with the help of greater Remember, her reader is our a b A. So we don't need to create different database. We don't need to create different sewers. That is our difference of a form of my lab. Are difference over for upset? We don't need to do that if you are playing with a B A. So my main more. David. This lecture wants to make you comfortable and make you understand about what is a p A and why it is important in the next day. Childress Talk about coin market dp a. So we'll be looking at how our response looked like and how we can send our own request. And also there are to dive off. A B one is get, and when it's supposed, you will read about more types once you start dealing with them. But currently, remember, major types are to get and post remember, whenever we only need information from so beside, and we don't want to store anything in our database, then we use get. That means we asked for some information and they gave us a response. But whenever we want to store some information and our database, we use post type. That means we'll be sending a request as well as some off our data that need to be stored in our database and then get a response, maybe a response off successfully stored or maybe a response off something related to that . So we have to die. One is get and one is supposed in the next leg trailer to stop more on this and start using our coin market gap, baby A. 3. Working with CoinMarketCap API: Hey guys, welcome back in this Lake Taylor. The stock about coin market camp and it's a p a. In the previous literally have taken a brief about a p a no notice Diaby Bitcoin market cap . As you know it is one off the biggest Cryptocurrency market in commission side. It give us details about all the coins. Their market cap prize 24 are William also circulation change in price on not more graphs. That information can also be achieved with the help of a P A. That means we can take all these information with the help of an A p a on show on our Web app or maybe on our website all maybe in our terminal command. So we'll be doing that to get our free A pay. Holy after do is just crawl down at the bottom and hey will get an option for crypto. Maybe a. Now all you have to do is just register of free plan and you will get access to 10,000 queries for a month, so you can also check out their prising. If any point of time you want to go with a professional plan, you can do that. But in this course, we're going to use free plan only just register. Come on, you're done with the exes. Once your record is created, they are going to send your verification meal. Just very fire email on you will be redirected toward dashboard controller ap A If we close all the other tabs now, remember, whenever you are going to play with appeared a p a. You will get an e p a ki this e p a ki works as your user name and password on you can regenerate it. You can disable it at any point off time. But if someone has access toe ap a key, they can do anything with your account. That means they can use your all the request or they might use it to send some post request . This is a basic trial account, so you don't have to worry much. But if you are working with the company, if you're working with appeared so pier, then this a p a is quite important. At this point of time, we are going to use a free account, So this is not as important as if you are working without company B. So all you have to do is just move on your documentation. Andi, let us take few details here. So you will get a quick guide and you will also get information about a p a ki and all the forms that are really important. But the media question is how we're going to get information with this particular e p A For that, we need to use our you are ill and pass out different perimeters and get this You are ill. You have to look at these in points. Maybe you want all the information off all the Cryptocurrency. So you will get you a little something like this. So let me take an example. So here I have a Europe in which I'm currently not passing my a p a ki So this is somewhat my coin market cap. A p a. You are look likes. That means I can get all the information with the help of this sling act. Currently, I'm getting an error with my response because I'm not passing my a p a ki or that we have to pass a para meter. Remember? This was my You are Oh, and after that whenever I'm trying to add a cushion mark or maybe on an option, I am passing a perimeter. So this is one off my perimeter. With certain values into USD, this is another off my perimeter with said my value from start equals to one. This is my another perimeter which sets of value off limited calls. To do so, we need to Allah perimeter for a B A and the starting over documentation to have given us our report method, that is, this is the method by which we need to pass our baby a key. So all your grew issues and an option then paste out. Discontent equals to your a p a. K. Now you can see I'm able to get all the information which I require. So are currently I'm starting with my ideas. One and I have limit off to on my currency is said to USD and then this is the command for my peaky. And I'm getting information for Duke up two points. That is one is Bitcoin and the other one is X R p. That is ripple. These are currently that ought to coins. Okay, let me change the limit If I go with five now, you can see I have updated result with Bitcoin. Then I have ripple than the tedium, then Bitcoin calf and then us. So I have now five fizzle. So that's how we play with a P A. And also, if you go to her dashboard and refresh this, you can see I have used my two credits for today, so that means I have a limit off 3 33 credits party with my free A P A and also 10,000 credits moment. So hair I'm talking about baby pays how company pay are used. There is also a practice eBay, which is available for free by coin market cap. So if you don't want to register anywhere, if you don't want to mess with anything, I'm providing your link that will give you direct information. So if you're going to visit this desire to order, that is a P a dot coin market cap dot com, and you can get access to a free A P A that is given by a coin market cap. You don't have to pass any off your key and you will get all the information in one click. So you have to filter out your result according to herself. So we are getting top 100 coin information and one go. And remember, whenever we were going to use a payday P a. You can see the doctor has more information, we have more security and also we have more flexibility. If I tick 5000 head and I'm going to get information off all the crypto currencies that are available, that is approx something around 2000. So if I screw alone since my limit is 5000 so I'm going to get all the information. The last one is 3185. I guess so. I did all the information off. All these coin according to rank are according to the I. D. So that's our e p. A work. We have different perimeters. We have different. You are, is on all the different thing in the next sector will be talking about how to get this data into our command from or into our program or into a script and start using that leader. That's all for this lecture. I hope by now you understand about a p A. How to register an account and how to get an A p A. I have taken an example off calling market cap. You can take any other example. So maybe you are creating a project that relates to Facebook. So there is a Facebook ap a. There is a twitter, a p a. Maybe are walking with something else. Everyone has their own developer eBay, that they provide users to walk on. They have different plans that are some creepy A and we can vote but that remember, you have to use your perimeters to filter out. Result on you. Haven't AP a key for the security at any point of time. You think you're a bake is not secure. Just disable that are regionally a new API, a key. So that's awful. This picture. See you in the next one 4. Fetching API Data: now in this letter will be fitting that out with the help off a pH. The most Turpin's. We need to use two models, one s request and the other one is Jason. So the request more, They will help us to send out a Should he be request and get some data. So if I have a p a link, I can use the same feeling to fetch data. That's again. One is Jason. So request help us to get the data. Jason model will help us to pass the data. That is, we can select and we can parse what that particular data. So we'll be doing that. Let us open my album. What I've done is I have created up by trip profile on my next stop, and I have created a mean door pile on all the courts that I'm going to write would be on me not by Let me open my Adam as well as open my domino. So here I can run my main nor pie. We can also use online editor. At this point of time, that would be much comfortable. This creator may not buy and start writing the cool for Now, I will be using online editor to explain you several concept. This was just to make you understand that. What is the process we need to follow? Yeah, here I am at my ripple. That is fun off my own land shell on my interpreter. So the first thing that we're going to do is import are two models, one is request, and Jason, 95% chances are that they are already installed in your system with the help of fight on itself. But if not, all you have to do is just use paper in strong request and Pippen strategies on that would be just few seconds. Ask now, we have important our model. Let me create available in which I would be storing my a p A data. Let me create our AP request variable in which I would be storing the data that I'm getting from my a p a. So I would be using my model request Don't get and then I need to pass my appealing Let me change my screen size on help, but data would be stored inside my AP request. The second thing is, once I get this data in my AP request. Really? Able. I need to use Jason to get a possible data. So let me create a new variable called a P A. Now we need to use Jason. Mourn you'll then Lord, function inside the lower function. I need to pass my AP requests as well. A start content which help us to deliver the content off this ap a request one status done . Now in this e p a valuable we have all our data. Let me try to print this one. So you will have a better idea here. You can see I got my data here on you will see that this is the date other time fitting on this is stored here. Since we are currently fetching date or five points with a limit off, five are starting at one on. We have certain AP a key which allow us to face the strata. Now let us also try this with free e p. A. And I was able to fetch this data. So this works. Find a law. I hope now you understand this basic stuff about this request and Jason model how we can connect with a P I. How we can load the state are on how we can pass with them and then print along with that. So in the next lecture alert escaped Laura data on the small thing that I want to focus on that piece to type off a p I would be lord difficult to work on. So if you're working on this pre a b A, it is quite easy. It is just a list on then Kardashian ity so you can fit strata in just one or two variable itself. But if you're going to walk with this pro e p. A. Than it worked quite difficult. So the next lecture let us discuss about it on start working on our e p A project. I hope this letter was helpful. See you in the next one. 5. Extracting API and Coin Data: now in his late tillers, start focusing on how to extract data. So at this point of time, we have all the leader, which is quite confusing. And we need to understand that how to fit a specific data may be just the name, prize rang symbol, some sort off specific thing. Since all the data is not useful for us, our main focus is to create a port for you up. So we mostly depend on symbol, name and price, so that would be sufficient. Let us start taking that and understand a bit more about these two. Type off A be a. Let me replace my freebie with barely be just a little bit off formatting on here that currently I'm printing my completely play response. So what I need to do is I need to get specific data. Suppose I need to get just a symbol. So what I have to do is I need to enter the stationary, select the data there inside this data. I need toe ender in this list. That is the first item off list on inside that forced item off list. I need to enter inside the symbol. This looks fine. So I Lewis, I need to enter in. Traditionally, that is off pita on one side, into data. Remember to look into the response clearly. So this dictionary is divided into two parts. The 1st 1 is status. And the 2nd 1 is data which contain all the response related toe cryptocurrencies. The status is just for time stamp some other court and all the other things, but the mean Cryptocurrency dies inside this. So it is in the form off list which contained the stationary. As he wrote item in the first item on so on. Here, I need the zero item on. Once I get this, he wrote item. I need to get symbol. Let's see if we get BTC or not. Okay, we got our result. That is Bitcoin following the same pattern. We can actually fit all the data. Let me try to fetch my price. So all I have to do is on. Instead of getting into symbol, I need to get inside my coat and then USD and then price. Ah, this looks big different. Remember, whenever we are going to use list, we'll be using numbering that 0123 That is my index position on whenever I am going to use dictionaries, I'm going to use the specific name One small thing. If you look into Jason file of Jason response, you were see additional trees everywhere. So it is really important for you to understand nationally is very well. The smoke's fine that we print out my price Also, I need to get inside my court once I'm inside my gold I need to get inside my USD once I'm inside my ust I need to get inside my price. Let me run this one. Yeah, I'm successfully able to fetch this state up. Remember when What? I'm trying toe hurt. Run. That means I'm sending a request. So these requests are counted in my database from my account. So whenever you send a request, it is concrete in databases it discounted in your dashboard. This looks find a law on. We now know how to fetch data. Let me try the simple thing with my freebie Also because from the next lecture everything would be done in this particular Abia on you can destroy a lot This free Abia. It is easy to use on. You can just started profess to did up. Let me try to fetch symbol and price here. So what I have to do is just use this particular link now for this free gave. All you have to do is yes. Fist our first detail formless on inside this first position we have additionally on. We have to get inside the symbol so we just don't need to get into data. We just need to get inside a zero to index and then timber seeing follows with this one zero index and then that would be price under school USD. If I run this one, you see, I was able to face the data. So that's how things well and it looks fine at this point of time. We now know how to get inside the data in the next lecture. Let us to more interesting thing with our crew. A B A would be creating some loops on, then start fetching data according to our portfolio. So see you the next one where we are going to do a lot more task 6. Creating Coin List & Understanding Portfolio: Welcome back. Now, in this lecture, let us start using some loops and also start creating portfolio according to ourselves. So before that, made a start changing step buster without program. So first thing I need to understand this if I need to print date off five points, basically two others were symbol in price or five point. I have to do a lot of tusk. I need to use an exposition off all the coins. So suppose I need to bring for five coins. I have to cope with this one and print out for five times with each coin. I need to change and exposition so this can be automated with help off for Lou. The second thing is, I need to use some formatting to remove all these extra decimals that can be done in a simple way. So forced. Let us simplify this small thing. We weren't back. Changes on her are a simple formatting court that we Paulo. And I guess we are comfortable with that. This used to decimal point and then use our former and store everything inside the particle . A format. Let me run this one. Yeah. This looks better in team now also use a follow toe print all the five coins that are in our limitation. So it is just out of for Lou on. I would be taking a range off 0 to 5. Remember, five has not include eight. It would be 01234 That would be total five coins and I'm taking an eye. So I need to replace the Ciro with I on after every symbol and price, I would be drawing a line to get a result that can be differentiated. Now, if I run this one, you can see now it is better in shape. This looks fine. Now let us start understanding what we are going to do. I'm going to create my own list in which I would be adding my own coin that I haven't festered since. We are dealing with portfolio. So we need to talk about coins in which we have invested. So let me create a list. So I would call this list variable last coins and I just need to pass their symbol. So in the later stage we would be matching their symbol to perform any operation. So the 1st 1 that I have invested is BTC On the second quietness us. I would be taking too early. At this point of time, you can take five. You can take 10 according to ourselves on Remember, these two coins should be in range. That means these two corn should be in this particle arrange. If they are not, just change a limitation from five you can make it Then you can make it 100. So there are approx. 2200 or 3200 Cryptocurrencies you can match accordingly so you can just take all the cryptocurrencies. It would be quite easy, but at this point of time for practice purposes, I would like to get us more result so we can do everything quite fast. So I would be taking BTC as well as us, which is already in my list off five. The second thing I need to do is I want to match out this data, so I just need date off these two coins since I'm talking about my portfolio. So I warn information off my coins only in which I haven't Mr I don't want information for BCH or 80 age or X r P I want information for BDC and us. This would work fine. So what I should do is I need to batch the element off my coin. That is the zeroth element off my coin with the element off my AP response that is this e p a. If these both symbol matches, that means I'm in the right stage. So all I have to do is add a new for new. So in this for you, what I need to do is I need to select a coin from my coins. Very well. So the first final be selected as p. D. C. On. I would be taking that on. I would be adding if condition if now we need to compare both the coins. That is the first element of this coin and also the element off my A b a. So if this e p a element is equal, street was to my coin. Then I will be performing these step. Let me down this one Now you can see I'm successfully able to fetch the information off these two coins only we can and Lord more information according to ourselves that as we can at their name this love, their total supply and all the other things. But the motive of this lecture wants to make you on the sign off this for Lou. So what we're doing is we're taking a range so we can look through the C B. A data on the first train will be zero. That means we're taking this year old data. So to your data, means are BTC. Once we get into BTC, I'm taking the list off this coin. So I would be taking the first element off this coin and then matching the symbol off my a p A data as well as my coin. That is my BTC nbt See if that is much I would be getting inside this on. I find inside this I would be printing my BTC on it. Surprised? So this would be the first to now. What I'm going to do is I will be taking the second element off coin that is us. And then I would check if BTC is equal to evil ways. If not, I would exit this room. And also there's no element left in the square. I would just go with the range one. I will be taking this one Taking my BTC Check out my one That is my ex r P is equal Screw BTC No, but go to the second coin that this us and fall of the same. It's quite simple. You just have to understand loops in a better way. And I would recommend you after every few Lecter Just perform these step because thes thing depend on your concept. That's all for this lecture in the next lecture, the sprint, all the return that we want. I hope this letter was helpful. So see you in the next one. 7. Creating Portfolio Dictionary: I hope things are going. They now. Now let's start talking about creating a port for you. So the first thing we need to understand what other things that are going to include in a portfolio? So if I'm poor chasing acquired on if I want to check my profit and loss and not a small thing, I would be requiring three things that need to be included in my portfolio. First is my coin. It will be either got coined name or coin symbol. The second thing will be what is the amount that I have purchased on 13 will be the price At what price? I have watches that coin. You suppose I have purchased us on number off us. I purchases 100 and the amount at which I bought is 2.5 That is each coin course as 2.5 on I have bought 100 coins. That means currently I own 100 us at 2.5 each. So that would be $205. So this is the amount I haven't Mr. Similarly, I need to talk about BTC. So currently I own Toby D C that I have parties at 2200. So this is the thing that we need to include in our portfolio. So there is a problem at this point of time Currently br storing everything in a list. So what I need to do is and just need to remove this list and I need to store additionally , so that means I would be storing a single item a stationary. So the forced item will be my first quien board fool you. The second item will be my second point portfolio so I can store them inside additional t like corn market is using to send out the leader. I think the sound confusing, but let us do that so it would become for the one for you. They can create my first element. And inside this forced element, I need to pass t things as you talked about. So the first thing that I need to bust this symbol So symbol is btc because the first coin that I own is PTC. The second thing I need to write this the amount I have own. So I would take it as amount underscore wound. The third thing is price per coin. That does. At what price? Our porches. This coin, that is one single going little on our program. We would calculate the total amount we have spent for this particle. A coin that is a farm board to BTC at 2200. That means I have invested $6400 for this particle. A coin. So this is the first element that I added. That is my first wine portfolio. Now I need to add my second element that is my us and then copy pay something similar. I just need between these values, I need to change few things here. So if I go inside this coin on this would take the complete. Additionally, this coin element will take the C wrote index. That means this complete nationally. And I need to go inside my symbol. So I need to our ah bracket and then symbol Andi thinks looks when they re done this one. Yeah, it's working perfectly fine. And I'm able to get these values now before an endless literal It means do one small thing . Let me also praying the coin name here. So that would be quite comfortable. Because from the next lecture, we'll be talking about profit and loss because at this price, we have board disc Wayne on. This is the current price. That means I need to calculate some profit as well as lost what I need to lose. Let me pray. Name off the coin and then dash. And then the symbol on hair. It would be prising. I would be adding that former, that would be quite easy for us to understand. So let me add name before my symbol. Didn't con captain ate it with a space dash space? Mary, please. This one tens looks fine. I let me down this one again. That's Bitcoin dash PTC and let me out a message off price here. Yeah, this is much better. So this looks fine. So in the next, like jelly, this talk about profit and loss. I hope this lecture was helpful to see you in the next one. 8. Calculating Profit and Loss: on this like Taylor, This twosome, Matt, and also talk about some profit and loss. So if you have invested some amount, there should be some profit and there can be some loss. So a few things that we are going to talk about here is the total amount we have. Peer. That is, if you have purchased these coin, that means we have invested that this we have paid some amount. The second thing is, what is the current value? So we have investors, something so it can be into profit that can be into loss. So I need to understand what is talk current value off my portfolio. The 13 we need to talk about this profit and loss. Paul Coin. And the fourth thing that we'll talk about this our overall board folio. So these are the four thing that we need to talk about. Let's start with our 1st 1 So total amount repaid for each point would be the amount we own on the amount we paid per coin. Let me take a new variables that is total appear on that would be equal toe. If I talk about for BTC, it would be too into 2200. And for us it would be 100 into 2.5 Let me take that one. So all I ever do is just used my coin because all the information will be inside this quaint and I need to use the value off a mountain and my deployed by price per coin. This looks fine. Let me bring this one so it would be more clear for us. Let me then. This one. Hey, you can see about the value. So I also need to format their before that I also need to print head amount we own. That would be much convenient since we are going to talk about portfolio. So I just need to write the amount we own. And also let me format this poodle Pierre, that would be convenient for us. One status done. Let me run this one. Oh, here. You can see we have Bitcoin that this PTC are prized number off coin we own on the total amount we bid the second thing. I need to print this our current value. So when we board it was 3200. The current value of Bitcoin is 2579. So the current well, it would be too into 3579 on the 13 will you to talk about this profit and loss, Paul Coin. So that would be 2579 minus 2001 day. So let us do these two simple thing Total number off when we own in tow the current value off each coin. So this would give us to my reply by the current value, that is 3579.35 So this will be our current value. Let me print this one at the third thing. We need to talk about this profit and loss per coin, so that would be quite easy. All our producers use my a p a price and then subtract my portfolio. Praise. I would take it as profit loss per coin and then copy base by variable. Let me run this one also. You can see this is the proper time Having power coin on. This is a prophet I'm having with my us. I can just multiply with number of coins so I would get my total profit for both the coins . Oh, let me do that. Also, so I'll have to do is create available called Total profit and nose with this queen. And then that would be equals toe our previous profit and loss That is profit and loss park wine. It would be multiplied by a number of coins we own. So if I am having 3 $79 profit with one coin, so for two point it would be just multiply my toe. And if I'm having a profit off 0.31 from us, so the total profit would be 0.31 into the number of coin I own for the U. S. That is 100. It would be 30.81 Let me run this one. Also, I have one small thing that you need to remember is I'm taking two decimal places, so it might bring a change. My new difference in the calculation off your final value. Now all these things are done. I just need to print one last thing. That is my total profit and loss. So if I'm getting a profit off $30 here, if I'm getting a profit off 7 $60 hair. So what is my total profit and loss? I need to print at the end off this program. Maybe after this loop. So all after is just take a new variable here. That is my total profit and loss on a sign zero at the initial level. And once you get inside this loop, we can assign value to it. So the new total profit and loss will be the old one, plus the profit and loss for this particular Quyen. So it will be zero plus 7 59 And once this group has done, it would be taking for us. By the time the value of this would be changed. Toe 7 59.78 on board are 30.81 So the total value don't know Toby different. So we'll be taking loop. So start with zero, then 7 59.81 and then 30.81 This looks fine. I hope you understand about this on Once the program is done, let me bring the final value. So all after those trended the final line about my total profit and loss for my portfolio and then print by total profit and loss that we have calculated on. Remember to do these formatting things so we don't get any Once that is done, we're just on our program. Yeah, thanks. Looks fine. Hair all after the worst. Just crawl a bit up on aisle aligning so we don't get confused with the compiler message as well as a result. So I would be adding two lanes and this looks perfectly fine. I hope they long you are able to understand each and everything on If not, I would request you to rewind these letters and watch again because these are important concept that we are creating ourselves. We are doing some formatting. We are calculating something's so this can be different for you. You might take different coin on your dessert will be different. So just spend some time with this on. You will be quite comfortable because now we are going to walk with G y. That is our Kinter. So I just need to take all these core into my atom and run them on to make sure everything is working Perfect. I just need to change You will use. So I would be taking it as 3500 And let me take some higher values. If I run this one hair, you can see now I'm getting a different dessert off profit and loss. My property is currently 1 65 on here. I gotta minus 1 45 on the total portfolio value is 1 51 So this program is working, as expected. Perfectly fine. Let me run this one after getting back to my old values. So till now, everything is working perfectly fine. All we have to do is take this wizard based into atom and test this one on from the next lecture. Let us talk about gender. That is RG ey software by which we can create application that we run into Windows or Macs or UNIX. So you would become for table to know and understand how we can create our own application . I hope this lecture was helpful. See you in the next one. 9. GUI Introduction - Graphical User Interface: Welcome back on this lecture will be talking about green. That is graphical user interface. So there are different type of libraries that are available with fight on on that Create our walk were easy The first library that you can talk about this cantor that STK in time. So basically, this is one off the best library and this is one off the most popular library. The 2nd 1 is Spike UT, which is currently quite famous. And I've got some really good updates in 2018. So these two are important libraries for breathe at its graphical user interface. We'll be using Kinter for our project. The next thing I need to do is I just need to copy whole core from my own name. Ripple. No, my offline Adam. So I would be saving in my main lord pie, which was inside my biker toe. Fuller. So now my completely does inside this may not by now. Let me close my own Linda Bill on. Let us talk about the sticky inter. So this basically help us to create our programs into some graphical format. So if I talk about some basic graphical user interfaces, you can talk about North Part, which is quite common. You see, this is the title. This is their fabrikant, that is their icon. And then there is a menu, and then we have our whole section. So this is also a good way for a note pad cord on. If I talk about second example, which is calculator on, which is quite famous on, if we have seen this type of calculator, you already quite family of agree. So we're going to create something similar for our crypto portfolio before moving forward or before trying to do anything else. I would recommend you go visit this PK Inter documentation that Eskinder documentation, which is available on fight on dot org, And this is pretty decent and simple documentation. You will get a basic and forward this morning. And also remember, the scandal model is pre installed with fight on three wars in. So if you're using python 2.7, you have to use pip install Kenter. And if you're using fight on three point X, the chances are cantor is already install, so all you have to do is just statically import on. If you go to the documentation you will get a brief idea. So let us get back to our Adam and start our walk. Since Canada is already in strong in our since Tom. So all our producers just import content without any issue. So I would be using from Kinter import all the classes that stuff. And if you are not sure that Cantor's and stolen a system or not, just open your folder. Open your command front or nominal on inside by potential just inboard Ghenda. And if you see that you're in double date is not giving any error, you are working Fine. So let us just get back to our Adam. And from the next little, let us start working on counter that is our G y. That is on qui to see you in the next one will be talking about a lot more regarding graphical user interface. 10. Understanding 3 Steps Tkinter Working: now in this little A to start working with Arcandor. So we have already imported all the classes from Kinder. Now I have to use TK Class to start our walking. There are three steps that are involved with any application off Cantor. The 1st 1 is to create an instance off Peak Ender. So that is we are going to use tiki class. The second will be all the process that we need to show on our graphical user interface. You will understand about this once we start working on it, The third will be to create our me Luke. That is, if we are running any program, you will have a been open. So the window is only working till the main Lupus functional. Once we close the window, you're going toe exit that main you. Nobody is. If you don't understand anything at this point of time, we're going to work on everything. The first thing we need to lose. We need to create an instance with the help off PG class. So I'm creating a bit space. Just start writing my program on the option and then we'll arrange everything. Let me create a variable. I will call it as five crypto. You can call it anything you want on. I would create the instance of the help off my DK class on. We don't need to pass any argument, so that's all just used TK The second circle in war. Everything that we need to show an average it that we'll be following in for the lectures on the third thing is to create a me Lou. So this looks fine. Now I need to add fuel things with my kindle. So if I take an example off G, why, that is graphical user interface. You see, we have a tighter So this is the title off our application. Then there is an icon which is optional. So we need to utilize that also on all the courting part that is the functionality off our application. So first let me out my title and then run are blank application all after those use my instance than door title. And then I need to pass title as my argument. So I would be using my crypto board fool you. This looks fine. Let me try to comment everything else so we can get the result. What we're expecting from these three lines now, before running our fight. I just want to mention this is capital T and small K. So one status. Fix little store. Enough. I'll let me open my cmd on. Just use my command bite on and my fighting. You can see I just caught my first application on you can just resize it on. This is my title on I have three options for minimize, maximize and also close on. This is our current icon. That s very corn which is by default. Kinter, we can replace this and we'll be doing that and for the lectures. But for now, my main motive was to make you understand about this basic inter application on how this graphical user interface works with our system. I hope this lecture was helpful from the next literally to start walking on RG Why? Along with according part to see you in the next one on, we are going to rock the cities 11. Tkinter Main Window and Labels: Welcome back Now in this lecture will be talking about different type off labels without Cantor on also how we need to proceed with them. So there are some buttons. There are some labels and also but this may Look, this is quite important. So whenever we run this program, so you can see act currently my programmers running. So if I close this one, then you can see my program is executed. Why This happens because off this mean Lou. So if I add a prince treatment after this mean loop and now let me down my program again, if you consider the best line that I have other is not printed. So currently, this program, this particular gee, why is holding? Because off this mean Lou on. Once I closed my geo application, all the lines that are after my main loop will execute. So here, if I close my g y application, you can see I got a friend off baseline. This is one of the important thing that we need to remember that all the work that we are going to do is before army you for that is fine. Now let us start walking with all the labels that are available with RG ey if I open my gooey gooey is divided with Drew's and column, so if you can see the lines hair. If I talk about Rosie Row and column zero, it would be this part. If I talk about true zero and Colon one, it would be this fire. It takes the size according toe, the grid that we are passing. So this basically work with the help of great system. So if we are adding a button, we need to give the position. If I gave you zero column zero, then the button would be a place at this point. If I gave Rose zero column for then it would be a different point. So we have to take care about that. If we close this one on my label, so do Adelaide will always clues, creative variable and then label class, which we are taking from Kanto module and then we need to pass to arguments. The 1st 1 will be our instance off Joy, and the 2nd 1 will be the text that we need to pass. So here I am taking label in which I need to pass some text. Once that is done, I need to create a great That means I need to provide the position. So I would be taking my valuable name that his name dot Great. And then I need to pass to arguments again. One will be rule on the other one will be Cornum. So I would be taking zero comma zero. Hey, remember, with label begin Pastor, argument regarding color regarding formed regarding size on different type of foreign styles will be doing that. Let me run the simple thing and take my result. You can see this is a reserve on. Let me resize it on. This is a zero almost right currently. So that's our label thing. Work on something similar will be followed with our button. So this is not an extensive intercourse. Our main focus is to get our job done with the help of Cantor and focus on how we can do a lot more thing. You can also use back instead of great, but that gives a lot less control. So we have to remove this one and just pass out back and let me just this one. You can say they got some sort off similar result, but we are not able to give through and call them according to ourselves. So this is not in our control when we are going to use back. But I would be recommending you to use great system so we can arrange everything according to our requirement. Now, let me add a few more arguments along with my label. Now let me add few arguments. First will be our background color. I would be adding it as black. The 2nd 1 is our phone color. I would be preferring white on. Then we need to pass sticky. So it would be according to our direction that is alignment. It will be north, south, east and west. You can use aniseed, a blue according to our linemen, and let me down this one. Hey, you can see one of the basic reserved and which I have a level on which have a background color off black and white as foreign color. Now, this was some of the basic thing regarding cater. In the next lecture mellitus format are AB on creator own function, in which we are going to create loops regarding our A p A on just fit everything regarding all our corn data. So we have Bitcoin, we have us and then we have all this data. So we need to fit in between the main loop on our instance. We will be doing that in the next lecture. See you in the next one. 12. Adding Header: you guys will come back now In this lecture, we need to do some formatting offer application and also start working on our application is going to look and also what we have to follow. So the first thing we need to do is you need to Owen comment on the court and also start creating sequence for them. That means whenever I'm going to run this program, this AP would be called on. I need to restrict them. So what? I need to do this. I just need to get all the score inside a function. So whenever I'm going to call a function, this court would be working. So let me uncommon this. And now I just need to create a simple function. I would be calling it as my boat fool you. We'll give the inundation and just shipped all my court inside this. So even if I'm going to run this main door pie, this would not be called. That means a pay would not be called because I'm not calling this function. We need to take care off this because at this point of time, I'm running this mean not by just for the sake off my Kenta on every time when I'm going to run this file, my pay would be called and I'm not utilizing it. Remember, e B. A is speed, and currently we're using a free version. But think about as a software owner why you are going to call a P A every time when you are not going to utilize it. So what I'm doing at this point of time, I'm creating a function adding all my code that are required for my calculation inside a function and we'll be utilizing that. So the first thing we need to do is we need to create a header. So if you see this a scream short, I need to create a header. Something like this. Let us do that. So forced, let me card from her on keep my function over the top, go to the bottom and then pays the core. So this is something outside my function on. I don't have to worry. And also let me change this test line to my program completely. This looks fine on on. Don't worry. We're going to remove all the spin statement since, since we are going to use this label and great to print out a result. So these prints statement would not be useful. The first time I need towers, I need to create several labels. That means I need to create a perfect heading and are all my information inside that? So let me create that. So I'll have to do is just copy be this. We will have a brooks approx. Seven levels for are heading that would be name price number off coins, total amount paid current value, profit and loss park wine on also total profit and loss of the coin. So these will be the seven values I just need to copy. Paste them on between this very believe him. Let me do that. 1st 1 will be the name simply going name. 2nd 1 will be the prize totally with number of coins, fourth will be total among paid, followed by current value. Then we need to pray in profit and loss borrow coin and the final will be total profit and Royals with that particular coin. So these will be all are required piece. But remember, we need to also take care about the columns. So the first thing would be in the zeroed color. The 2nd 1 would be the first color. Then we need to fall over 2nd 3rd 4th 5th and six. So this looks fine. Let me run this program so we will have a clear picture. And if you look here, this looks quite messed up, but we got our first true on this is a coin named and pry it and coin own than total among paid. So we can now understand that this is our room on. We have just messed up with our column. That means with the color off our column. So at this point of time, I'm using black as my background on Dwight as my phone color. So that is why this looks quite misto. If I open my CMD and close this one, you can say I got my program completed, us the result. That is my output. So I need to focus you things regarding designing that we will be doing. I hope now you haven't and assigning that what we are going to do with this particular thing. So that's fine for this lecture. But we need to focus on designing. So what we need to lose we need to give it something a look off sheet on something that can give us a portfolio feel. So what I need to do is I just need to know Phil few forms. That is, I need to get more rose. That is our data. And also I need to differentiate my header with my current ruse that will be doing. And also I just need to change this color because black and white is not giving me a feel off portfolio, So I need to focus on that. So that's all for this lecture at this point of time. In the next lecture, let us fix all these issues. First we need to focus on are designing, but on. Then we need to start walking by filling our portfolio. That means we need to start showing a result off Bitcoin us and all the other coins that we have so see in the next one will be filling up our portfolio 13. Adding More Data: welcome back now to start walking on our portfolio up. The first thing I need to do is I just need to change this background color so it is quite visible. Our main focus act current point is, would have left the AP, and the next focus will be to make it more appealing at currently, I just want to get this done. So we will be able to use that and differentiating So I would be using to basic color. One would be white and then great on phone. Kurer would be black. So this is the basic editing garden I just used alter native quarters for gray and white, and the phone is currently black. Don't worry. We are going to fix this part at later stage. Currently, our focus should be to create the app. So let me down this one and see out. My result. I think this is sufficient to differentiate this column on this looks fine. Now let me fill this up without result. So we have two points currently BTC and then us. Let me add them up. So I have to do is just go here now here at this point of time I'm printing this result. What I need to do is I just need to add them with the help off our labels. So let me copy these label on. Just based there. Now, here. Instead of this text, I need to pass out this particular result. So this would be the coin name, actually quite name. So that would be the Bitcoin. And the second will be the prize. So I just need to fill out these. So what I need to do is I just need to copy out these result and pays them here. And I need to follow with all this time that's done. Let me come in about these. We'll get before talking. Anything else? Let me run this one so we can see what result we had expecting. So if I run this one, you can see I got nothing. Why? Because I haven't called dysfunction year. So this is just inside this particle of function and we haven't called it. The second problem we are going to face is that everything is on rose zero with the first loop. There weren't toe print. This rose zero on column zero as a kind name then withdraw zero column one s prize. But whenever we are going to call this function, they are going to repeat the same. This is going to create a conflict. So what I need to do is I just need to create an increase drone number. So suppose if I run this application now. So I drew zero be warned this heading at through one. I want my first coin at Proto. I want my second coin. So I need to keep a track off through, so whatever the initial row would be, I just need to keep adding one with this particular low. So if I'm going to print first coin, I just need to use the first row, second coined and chicken rule that I have to follow because the Ciro true is always going to be kept by this heading. But with our 1st 2nd 3rd and all the falling grow would be taken care with our coins. So what I need to do is I just need to add a new variable called Drew. I would call it as coined. Oh, on we will start it with one, because zero true is always going to be heading. So what I'm going to do is I would take this first row on. I would pass this fast rope or all my trophies. So now what is going to happen at this point of time? We started with this flu on our current run. A modest one. So what I'm going to do is with the first coin, I'm going toe pain one. And then I would increase this rule number with plus one 10. So example and fine. Now with the left slope, I'm going toe printed us toe. So this would take as Roto. Let me run this one and see out. My result. You don't see anything because we still haven't called our function. So let me call out my function for us so we don't miss this point. Now let me on this one. Hey, you can see I got my result. And I also printed these points here which was added in my loo. You can see I got my result. And it's perfectly working fine. And I don't have an issue, so this looks fine. Now this is row one Roto. Let me add more coins. So this would be quite friend up it because this one on a few more coins on also, I don't need this one on. Also, delete these two lines. Let me have two more points to my portfolio. Before that, let me change my limit. So some 300 the third quarter. I'm good word would be LTC That is light coin on then. Fourth would be exam Are this Looks fine. Her. So what we have taken is we have changed this limit toe 300 toe, four coins. Now on also change the strange to 300. Let me run this one. You can see. Now we are able to create some sort off old fool you application which has data. All four coins. Yeah, this looks fine. And I can have some read. Don't miss out. Call your from 10. This can change quite a bit. Result. I hope this looks fine. Now we have populated our result with a Jew y application. The next thing we need to do is we just need to amuse better forms. We just need to use better space. Also are our fabric on here? That is my I C o file and make it look better from the next lecture will be doing that on fixing all the guarantee foods. So see you in the next one. 14. Improving User Interface: Welcome back. Now let us start working on some part of designing. So all app looks better. So if I run my current top and look at this, the first thing I need to do is I just need to fix this heading my heading should look different. Phone should be bored on the color off. This particular heading should be changed. That is, it should be different then. All the other rules. The first thing I need to lose change out our background color so we can use crave. We can use white one color. I have selected list Dark blue. So I will be just copy pasting my color that I have selector. You can select any color According to yourself, this is one color that has stuck in my brain. So I'm just using their And I'm not a good designer, so don't completely with the selection off colors and the formed and different sizes, you can do that yourself. I'm just trying to make it look better, So it would be quite appealing for you. So start walking on this. So this is the first thing I did. I just change the background color on Let's make my phone. That's white. Since I'm using dog blue to the phone. Why? It would be better. Let me run this fun and see out. My result. Yeah, this looks better. But what if we are some sort off water and change our phone color? And I had some planning. So here, I just need to add one more perimeter that is formed on. And we need to pass three things. The force will be What is the former name I would be using Plateau, then the phone size here, just usedto. And then you need to use regular italic bull whatever you're requiring, Let us use bull. So we're done with our phone. The next thing really to do this are patting. So I would be using padding as five for both side. That is X and my exes batting is something like spacing with their phone and the border. Let me also are some sort of border. So we have a perimeter called border with, and I would take it as too. And then we need to pass out relief, which I will be passing as crew. And if you are thinking how I got this much information. Just go to some documentation. And whenever I need to do something, I just talked. Basically will search. Like if I need to add a border with my Kinter to search border and cantor or something related to that, you would get stack or flu, which is quite important. You need to get a habit off searching stack overflow. So let me add my border where? Test two and relief as group. And also don't forget to fix this. Wait, this seems pretty fine. Let me run this one with just one label on. Then we are going to try out with others. So yeah, this is going to be a result after using blotto as are formed. And this is pretty fine. Let me replicate this with all our field. So all you have to just copy this one here, one secret toe based on all the lines, all your crew is just use control and then select all the points where you need to paste this one. So I would be selecting all the points and then control. Plus, we that's done on this looks particularly fine on my file again. And yeah, this is our current status. The second thing I need to do us, I just need to fix this one. So I also need to add some styling, tow them, and also are laughing. Going to this point, we let us do that. Let me add my styling here, some basic styling that we are going to lose a lot. Oh, well, that is our phone. 10 out of foreign Saiz and then our border, where there's to some group and then pad access to and do so. This looks particularly fine. Let me quickly add them for all fields. One status done. Let us test this one. Gail, you can see this is how our current results look like on this is quite fine. Now, the first thing I need to do is I actually need to change this icon. So let me add fabric on here and ultra obtained these colors. So let me do that. Here are downloaded our family corn that is related to Cryptocurrency and do other fabric on. We have to use icon bit. Map mattered. So let me use that. And here I just need to pass my fairy corn name with respect to the position. Since it's in the same fuller. So I just need to pass out the name and it should be ice. You're fine. And now I just need to change the color off our phone, which is inside our function on I would prefer a gray shaded color. So let me choose that Here I have replaced all my background color with some sort of creation. It color Let me run this one and cr look now. So this is our current look at our app is looking absolutely fine. So this is how we are going to work on this. We want to add our favorite corn. So this is looking like a real g y up. Now I need to add one small thing. So I should add some sort off total profit and loss and our total current value, so that would be quite fine. And I also need to are some sort off our total investment in now. So we just need to add these three feel on our current brew is full. So on fifth row, I just need to add my total profit and loss. So I have my profit and loss since I'm already printing it quite some time, so I just need to use my legal method on paste it here. Once we have pasted, I just need to cooperate this profit and loss on to our next on Just remove this one. So our final rule number would be four hair, But before exiting the slough, it were in Crete mint with one on hair. It would be five. That would be fine on down my half again. You see, I am printing my total profit and loss putting. I need word. I also need to add my current value on also the total amount that I have invested. So just crawl a bit up. So current value is this amount. So I total current value require me to add the sun. So I just need to do with the flu. And the second thing I need to talk about is the among appeared. So I just need to use that also, so that may create a new were able for our current value. I would be call it as total current value on well started with zero. Now what? I'm going to do us whenever I'm going to come inside this loop I just need to add that current value. So our new total current value would be our total value, including with our current value. This looks find her, let me at a new one. Hair. So this would be on column sixth on this one will be on call and forth on here. I just need to add my total current value. Let me change this one also, if we run this one so I can see if I'm doing right. So yeah, this is perfectly fine. I'm getting my current value as well as my total profit and loss. So this looks fine. Now, I need to do two things that currently I'm not able to understand how my profit is going, how my losses going because everything isn't same color. So I need to fix this. So if I'm going with profit, I should see some sort of green. And if I'm going with loss, I need to see some sort off red. I need tohave update button so I can update this value after every five for 10 minutes, according to our a p. So our a b A updates after every five minutes. So I need to do that. Also, in the next lecture, we are going to talk about how to do some color stuff to see you in the next one. 15. Color Indication For Profit and Loss: Welcome back. Welcome to our big messed up courts. And I hope you're enjoying session now what we are going to do us if I run my program. Currently, we're missing some sort of green and red with our portfolio, and that is quite important. What I'm going to lose. I'm going to write a function on. If the value is positive, we are going to return phone color as cream and after value is negative, we are going to return phone color as red. So this is one important thing. Let me close this one. I need to focus on this point. Our phone color on Currently it is black. So let me add a new function there. I would call it. As for color, remember, I need to take one value from that. That is amount on. Now, inside this particular function, I need to take that amount. That is the value checked. If this particular value is creator than equal to zero, then we are going to return as cream. And of this particle of value is less than zero, we are going to return as straight so all our crews use if amount is greater than equals zero return green else returned. Ready? So this works fine. Now, I can use this particular function at any point or time. I can quartered inside my phone color. So here in sort off black, that is our current value. What I can do is I can use my phone color function on here. I just need to pass out the amount. So if I passed my alone does this on it is going to return green. I just need to remove my dollar sign and also convert this particular value into flute. I just need to make sure that it is flute and not string. So just add afloat hair. This looks fine to me. Make me done this one. Yeah, we got a result. So what I did is on our current well do column. I used a function called phone color on this particle off one color. Take the value. So did this particular value in flute or informal. And then check with the help of our phone color function that if this particular value is positive, it is going to return cream on. If this is negative, it is going to be done as red so this ft would be green or red. This looks perfectly fine. Now I need to check in which field we need toward this in current value. But this is not goingto get into negative life. Need to remove her. I need to add into profit and loss because loss can be negative. I also need to go out and do profit and loss with total. So I just need to add in thes to let me do that first. So all I have to do is just copy this one on based here. And he placed this current welling with our profit and loss park coin. And then total profit and loss close this one on display. Graham again, You can see. That's fine. That's totally fine. Let me change or some value so I can see some sort off red. So let me close this one on change. Value her. Maybe. Pointer does 48 on making this one as two points and five run this one again. You can now see that there is some rare daily some green on. Let me also change this one on. Make it as black for this. And now just change this one copy peas, the phone color function and then copious. My total profit and loss just looks perfectly fine. We'll do my program list. Cross this one on this one again. Yeah, that sorts for me. So our current profit and loss is $881. It is fine because it is in green that I can understand. Now that's all for this lecture. In the next lecture, alert the stalk about update Burdon. So let us out that a great burden and understand how we are going to update after every five or 10 minute whenever are a very fresh 16. Adding Update Button: I'm just lecture. Let me add and update. But in here. So what? I need to lose that. Currently, we have four rows than fifth row. I need to address six. Throw on, then insert off label. I would be using door button on with this part, and I also need to create a function. So whenever we're going to click on that particular bottom, we are going to call about the color function. So that particular function is my portfolio. So here we currently have total CV total profit and loss. I also need to our update button. That would be a symbol of did on her instead off neighbor. I need to use pardon, and the text would be update itself. We'll be deciding remaining thing at the leader stayed on. I just need to get a black color formed on here. Remember, Rule would be increased by one. Yeah, this looks find This is our update button. And it is doing nothing because I need to add an argument. Call command and I need to pass a function here. I need to our argument call command and I need toe our function, which is my portfolio. So What I'm going through is I need to clear up the state of which is currently in my a p a . Whenever I am goingto click this update button and get new later. So whenever I am going to call this function, I'm going to get new data in this. A p a on this new data would run all over again in my function. So at the end of dysfunction, what I'm going to do is I'm going to delete all my data so before my update. But I'm going to clear up my a p a. So if you look out there, what I'm doing is I'm feeling all my data inside this e p a on what I'm doing at a later stage once the slope is completely once, all the values are printer. I'm going toe empty. This a p a. So whenever I'm going to call this update button, that is my portfolio function. It is going to call this request on film I A b a with content that this latest re fresh content on this would help us to refresh our data. Let me close this one on run this one again. So I. Currently, our current profit and loss is 8 94.4 So if I try to click on update, it is not going to do anything because our e p 80 fresh every five minutes. So I have to wait for next five minutes to click on this button. What I can do is I can just fast forward these five minutes and then I would be clicking on this update button. Then I cannot do anything because I have to wait for this. If I click on close, I would get a different result automatically with my next run. So I have to wait for five minutes and then click on a bed. Let me click this one on here. You can see my result Court updated. That's our update button is going toe work. We're just using a simple logic that clearing apart AP A data and then calling up our function again on this is going toe work well. And if you want to show some creativity, just change the background color off update Burton and also changed their phone color that would work better. So this is our current portfolio application with the help of TK Enter on this works perfectly fine. This is one of the good basic project to test our understanding about bite on Because we have used loops, We have used different arguments, clean up our FBI, read a small function for green and red, create some baden and use DK NdeR So this is quite helpful now what I need Louis, I need to create our dot e x e file. So I Currently this is dark by file. What I want to do is I want to create our dot txt file so we can run the software in any computer. So in the next lecture, let us talk about pie installer and how to convert our daughter by file to dot e x e file. So see you in the next one. 17. Creating Executable App (.exe file): we'll come back now In this lecture, we are going to lose something really interesting. We're going toe create our first executable up. That is R E X e file. So that currently are projectors in tow. Sort by file on what we're going to. Louis, we are going to create our dot txt file with the help of her lively recall by in Strano. So all you have to do this. Just visit your CMD or your terminal on call Pip Install Biden stroller. This is one of the important library that help us to create executable files. It might take a few seconds or few minutes. Just download this library and then let us get started. Once you're libraries and strong, let me create my mean door pie. So let me clear this one. So there are three mentors and I will talk about all the three metres on will make you understand. What is the difference? The force with her to create our daughter by file into an executable file is just Simply call pine stroller and in the finally remember, you should be inside that particular fuller and which start by finest present. So just call by installer and then you're finding which is mean or by Remember, if you are calling this as may not fire, you're a result that is, your XY executable file will be as main door dxy. So you need to take care off your file name. Let me focus on me nor by currently. And you can change according to your requirement. And also at the bag. Don, let me open that particular folder. So you should know what is going to happen at the background. Let me execute this one on Hey considers going toe build and there are 24 less. There are two new fuller that is build on. There is GST. This process might take a few minutes. A few seconds according to your system Let me come to my desk DST and inside that I would have my mean on hair. I would have my txt file. This looks fine on If I go back here, you can see there is also a Bill Fuller hand with all these files. Remember, the difference that we are going to talk about different matter is indexed file. There are too many files on what I want is I just want one txt file that contains everything. So if you see the size off exit file at this point of time, it is 18 to 3 k b, which is approx 1.5 m b. But let me get all this data inside one X if I only And also if you look here at a larger skin, there is by Defour daikon. I want to change this item on you some custom. I can't. So it is 1.77 MBI and there are so many files regarding hash libraries regarding soccer there is Kindle file and also select file. So I just want to render everything into one excel file. So for that, we use the second matter. So let me go back here on delete all these files. Now come back to my terminal here. I would be using my second matter. All you have to do is use your fine stroller. Then you need to pass out the final name. Then you need to pass the arguments. One will be about one file, then no console and then icon. So all you have to do is use stashed us than one file, then no control. Then again, Dash, dash icon. And then you need to go pass out dyke or name. I would be using this particular favorite on herself, so just use equals two, and then the location off your icon. It's in currently same. Fuller. Just use favorite cornered. I see. Oh, and don't forget to use correct spelling off by installer. Let me run this one. And this might take a few minutes again on Remember, this time we are going to have a single exit file inside our guest. So this is quite important. And why we're going to use this whole process is because if you want to pass this A software, if you want to pass this are If you want to upload this as a software, you are going to use one X If I you are not going to use your dot by file or some other files. So inside this exit file, your fight on is compressed. Your all the libraries are compressed. All Dechaine, the files, all the classes. My third, everything is compressed. If you want to run this particular program into your friend system, you don't have to install. Bite on. All you have to do is create a txt file and just send them the software he would directly run on this. Particulate txt file contained later, Sergeant off fight on identifies and all other files. If you remember. If you recognize for never installing the software, it takes several minutes. It give us warnings. It gave us terms and condition. This is all the process off installation, off libraries, dependencies According to that software. So this is what we are doing. We are rendering everything inside one txt file on. This is our icon. Let me cut this one and paste it here. And if I run this one, we're using dot e x e file here. So this is our software. This is RG white. This is our txt file on. This is our application that we have built. Oh, it's updated. This is something really cool that we have built from very basics on dried each and every line off court ourself on. If I close this one, remember, you have to keep these boat filed together. So if you want to work this software, you have to keep the sport filed together. Otherwise It might give you an error, I guess, in the leader subject because they need favorite on file along with this particular file. So you have to keep these to find together whenever you are trying to run. So that's all for this lecture. We have finally build our own exit file. Executed will file and understand a lot more about Fight on. Basically, we understand a lot more about Kendall also. So that's all for this lecture. I hope this lecture was helpful. I hope decision was helpful and see you in the next one. 18. Databases - SQL vs SQLite3: Hey, guys will come back now in just like Children. This talk about databases, so we'll be talking about my SQL as less sq light. I hope you might have heard about databases. So if you're into any development, feel databases are really important. You know how important is did on our teas? We have to store data into certain rules and column on that's where. Database coming so bitter. So we have to talk about two things. The 1st 1 is about my school database and sq light on the 2nd 1 Is vibrio using a school light over some sheet? Or why we are not storing their tryingto excel or maybe less from a tradition Aires. So why we're using databases? So don't talk about first point that is my Skrill and ask your light. So my SQL is actually a full database, which required to install czar their files set of Passover. Create some root user set up a password on. There are a lot more thing in wall, so this is something like a proper relational databases, whereas if I talk about sq light, you can see with the world like it's a minimum version database which can be used properly like my Skrill, but it don't require to set up a sober on it. Don't require a user name and password like my sequel, Little Blisters. So it's a light version off my sequel, which do exactly what we want. The second thing is why we used our databases why we use a school database or sq light database. Why we're not storing detained for more PlayStation Aires, or maybe in the form off Excel sheet or TXT. The main reason is that databases have data points. We can create different tables like we can create different sheet and exit point, and also we can store everything in row and column format permanently. So if you run your program first time you store some data, you might start working on that program. Maybe after 13 days, that data would be stored in that particular database. So if I talk about Facebook as an application, it's store everything inside their databases. You could you do use a name. You keep your idea. You keep your password, you get your first name, last name. Everything is stored in the form off table rows and columns so they can store your information. And whenever you're going to visit Facebook, you can just extract that data with the help off certain variables on also 13 fields if I want to. Some abort its database. So databases something. It's a collection off data. Did you keep in an organized manner to divide all the data in the form off tables on? And there was You divide them into rules and column if I take an example, maybe off a company. So companies usually use databases maybe for their employer, for the projects for their future projects on for their past history. So for their employees projects, all these are tables. And if I talk about rows and columns, so for employer, they might be name first name last name. So all these would be rows and columns off employed table. The second can be the projects, so they might have different type of projects that would be stored in project table in the form off rules and column. Third might be some attendance system, and there can be a lot more things. So that's how our database tables and rows and columns are divided. If I talk about in general perspective. What? We are going to perform with Dita V's so the first thing is to insert data in a database. Second thing is to fetch the needles were if we haven't sorted. So, Dane, amount of data We should know how to get that data back. Display toe user. Third will be how to update that data if you have store a name on some salary so we should know how to obey that particular data. And the 4th 1 is how to delete data for these other four important commands that we should know. And we should be family there to work with any data bees. I hope this letter was helpful. This is a brief starting or our school light Vietnamese in the next little earner. Start working on our database how to import our data, how to create connection, how to create database on all other stuff. So see you in the next one and let's get started 19. Introduction to SQLite3 and its Workings: Welcome back. Now let us get started without sq Align. If I talk about, ask your light. It's a lightweight database that can provide Relational. Did our management system with zero conflagration? Because we don't need to configure anything. We don't need to set up anything. We just need toe import a scree light. Three. It's already available with Fight On on. We don't have to do anything. The second thing is, in general, sq Light is a soul estate ofhis that can be used within almost all programming languages, including fight on. So So unless means there is no need to install any separates over to work with our SQL line so you can connect them directly with their data bees. As I talked about earlier, my SQL requires some soldiers set up. We need to set up user name and password now, the first time that we need Louis just radically import a screen line. Three. Once you import your SQL light tree, you have to perform $3 every time to the Force. One will be to create a connection with the database. Second will be we need to create an object for coarser and 3rd 1 will be to close all the connection that will be at the end of the program. So that means you have to perform these three step for every program in which you want to include esque rely tree that this you want to work with databases After creating coarser matter, you can do anything that you want that is your execution off update, insert and all the things that you are going to work with your daytime tables. But after that, we need to close our connection without delay. Let us create our first connection with our databases so you take a variable corn and I need to use my ask your light tree than door, then connect. And then I need to give up date of his name. That stunt. We have created our connection with our database. The second thing is to execute any SQL light statement. We need to create a coarser object so you can created with the help off coarser matter. A square like three course, it is a matter off connection object. So to execute the school lightly statement, a connection is established at first and then an object off courser is created using the connection object. Once that is done, we can now execute all the queries. All the statement with our databases. So before doing anything else, let me close thes connection and run this file so I can create my date of is Now, let me run my mean, not by and see. What is that? I'm going today. I haven't got any on you can see I have my my company and or db. So this is our database? Basically. And it contained nothing. But my main motive was to make you understand about this on if I open this file, you would see nothing. And we cannot use this db and Atom. We have to use different software to actually view our data. Viz are currently this looks fine. So I hope you understand about all the process on how we are going to execute and all the queries, although statement would be present here. So, in the next lecture to start creating tables, let us start doing some query. Well, I hope this letter was helpful. See you in the next one. 20. Creating Table | Working with DB Browser: the comeback now under selection to start working on our table. So to create a table, we need to use table query in the execute metal with the help of our cars. Our object we just need to use execute matter on Just call out our table query. Suppose we need to create our employees table in which we are going to take I d name salary department position on may be few other fields. So all I have to do is just used this car, sir. Object. And then we need to use execute Meant are. And inside this as a perimeter, we need to pass, create table equity, create table and then the table name that is employs. And then I need to pass column name and then their data, right. So I would be using i d. As in teacher, because each employee should have an I d. And I'm using a primary key with this keyword. I'm defining that this particular value, this primary key cannot be duplicated and it would be unique for each and every individual entry. So that means idea would never repeat itself. Then, second part of my morning as name which is fixed. Then suddenly Azria department as sticks and then position as sticks. So if I talk about different data types so there are none in teacher, really text and law, no means there is no value in these are beyond No. Then really contains all the floating points. Text is basically string and then globe is for data that need to be stored within some form off images and everything else. So these are five types that I'm currently using. So what I've done is basically what the hell off course are? I open a sheet and then I executed this program. Then I need to commit them. That means I need to save and modify my changes. So all after Lewis, I need to use my collection objects and then use coming. Remember, whenever we're going to mortify anything in our database, we need to perform comet so execute will be performed on object off, coarser and come, it will be performed on object off connection. I hope this is clear now on are currently we have our empty database. Remember, be only perform, create table once. That means that means if you have created a table they find all the rules were not going toe Perform this Create table every time. What we're going to do us. Maybe we are going to add new fields in that particular table. Maybe we are going to delete any field. Maybe we are going to update any feel. But we're not going to create table every time it is created for the first time and it is going to remain scene. These are just heading the remaining that I we are going to use insert. We are going to use update we are going to use daily. But this creation off table is only once to let me run this program. I hope you are so a blink here on if I need to check my database right now, you need to check out our DB browser for rescue light on. After that, you can directly open Your data is filed in that D be browser one status downloaded. Just open your Devi browser for rescue light on Hagen takes currently empty All afterburners. Just add minded of this on. You can see now I have our table that is employed table. If I open this one, I have I D name, Salary department position on I have also defined their fields. Just looks fine. Let me browse data. It's currently empty. So there is nothing in my current fields. I have two insert data. That son, I hope I was concerned about creating a table in the next lecture. Let us talk about creating data, updating the time deleting data on also fetching all the data from the database. Hope this lecture was helpful. See you in the next one. 21. Insert Values - Databases: come back now. In this, like chillers and certain values and our data, please. So let me commend these. As I said, the only run create table ones once our database and wants our table is created. We just run well, used to insert on a they delete on fake street up. So let me use my car, sir Object and then execute matter and pass a query to insert an unemployed people. What I need to pass with my query it would be insert into than my table name then I need to use values and then Interpol We need to pass all the value that I want. I would be one that I need to pass my name Salary by department on my position Remember, there are a few important things hair on taking them as capital. Just toe. Make them beautiful. You can take them in small letter. That means a school is not sensitive language, so you can use them with brewer caps as well as upper caps. I'm using them upper caps just to make them readable. So these are my values on the upper caps are related to instruction from a school. See my followed here. All the values in uppercase waas for SQL and all the values in Lukis are my dedicated team . So that's fine. One status run. I just need to pass out. Come in. So things looks fine, But remember, this is the worst case in annual. Nobody. I would be talking about biscuits, But whenever we try to use this matter, this matter is actually the worst case on it. Can be caught with SQL injection. Well, we're talking about best cases. Well, let me on this one so we can see how our values are added in our table. Let me down this one. I'm gonna got any air tense. Looks fine. Let me open my database. We have one table on. Let me go straight ahead. Yeah, I got my do down. It's not something for even if I don't pass my i d. It would take order. Increment. That means if I passed new data without idea, it would take it as two, then three, then four and four on. So this is the first method that we can use. The second matter we can use is question mark as placeholder so it won't for another seems in Texas, all I have to do is instead off using and passing out my proper value. I just need to pass question mark here. And then I need to pass a second entity as troubled with all the values. Let me take these values from hair and passed Kocian, Marcus Placeholder. So we are five values that has idea. Name Sandri department in position and then all after those after this particular qui I need to pass second and pretty with all the other losers topple. So this looks finally means that has to let me change few values on its done. So this is our entity in the form off. Double on. Remember, we need to take care off. Number of question marks on this would not automatically with all the values. I'll let me run the squarely. Also, we currently have one value on receiving our database to If I'm going to run this one, it would be saved a second value. You fresh this one? Yeah, we have to values now on. This looks totally fine. I hope now you are able to understand how to insert value on our data. These important fingers in real life project. We don't pass each value individually. We use everything in dynamic way that is, recreate a function for insert. We create a function for update, create a function for daily and then passed the values in that particular function that really would be used here. So we're doing that by the end. Off the score. Stoned. Worry. That's all for this lecture. We haven't started our value. In the next lecture. Let us talk about how to update our demon. 22. Update Values - Databases: I understand Children, some data are loose. That is update our table. So that's quite simple. We have to focus on update equity. And also we need to perimeters here. The 1st 1 will be which particle value any toe day. So if I want a date first value, that is I have a unique I d. That is one. And if I need to obey the second row, I have a unique idea that is to so my and unique I d. My mapping thing would be done with my i d. The second thing is what I need to update. I need to update my name, my Salvi department. So what? I need to update. So suppose we need to update this department for this particular employ with the help of decided. So this is unique for every imply. I mean you to update their department. So let us do that. Let me commend out my insert Kuwaiti now use my car. Start object on here. All I need to pass out, update my table name, then said what column? I need to update that the symbols I need to update my department equals to that particular new value that I'm modifying, and then I need to map that unique I d. So I would be using there, and then I need to just give that particularity. This looks fine. On if I'm updating, I have toe commit some changes, so I just need to use my connection object and then comment. Yeah, that's totally fine. Let me run this one. Haven't got any other. Let me visit my databases on. Let me refresh this one. Yeah, I want a bite on. So this works fine. And hair off dated my particle a row with a new value. So this is working fine for us. So the next night, tailored issues select as well as fetch all statement to get our data that we have already stored in our database. I hope this lecture was helpful. See you in the next one. 23. Fetching Data From Database: you guys will come back now in this lecture will be talking about how to fetch data, how to select data from RD dummies. So we have stored these two values and our databases that a sugar on her shit. And if you want Oh, French, this data and print on our command screen, we want to show maybe on our kinter application we want to show on our general website. Maybe we just want to print this result on our command line or dominant. So we need to know how to fetch state out from our databases before that. I just want to tell you that you can use caution, mark method that doesn't stop providing a parameter value. You can directly use question mark, and then you can provide the values and a second entity. So this will help us to protect our database from a school in diction. This is our recommended type. So now I just need to pass out my new value in topple now if I read on this file. So in the previous change, I have changed the value of department as fight on for my I d number two. If I read on this file, it is going to change it as PHP That's done. Let me the fresh my database. You can see I got my results. PHP. So I would recommend you to use these to anti matter. That would be much easier as a less. It is quite secure. Let me commend this one on. Let us talk about how to fetch our deduct from rd dummies. So to fetch our data, there are two steps that are in wall First. We need to tell what type of data we require from which table. And then I need to use a command facial that will extract all the values off my requirement . So I just need to select the object and then the values. So just use my cars are object, then execute, and then I need to pass. Select as strict or you can call it as a start. This means I need all the values from employees. So this is my table name. Now. Once that is done, I need to use a command facial. So this would return me objects. So that means it would return all the objects that are stored in my databases. So Currently, we have two object oneness. This one and the other one is this one. So it will store these two objects. Now I need to fetch data from these objects so I would be taking a variable. May be reserved now, In this result, I just need to use my cars are object and then fetch All Come on now. This result has all the data which I require. Now if I print this result, I will have all the values that I requested. So here I have given start. That means I need all the values from my data bases for this particular table. So let me print this one. And if I had only me, Nordby, you can see I got my boat. There isn't so the result is inside our list. That means I can treat using a for loop and then I can use in exposition to catch them. So if I use a for loop, I can easily trait through them on. I can also select their values and we try to retreat in them. So I just need to use for item in results on I just need to print item. Hey, you can t I got my two objects on if I just want name All after Lewis used my first in exposition. You can see I got my respective isn't now here is a twist You can provide what column you require from database. Also, you can provide a condition. So suppose here we have a result. So I just want name off particulary employees who are earning more than 60,000. So I can provide this condition with my query and they will fetch that data as I require. So instead of this, a star all you have to pass his name and hair after your table. You just need to pass out the condition so I can use their Sandri is greater than 60,000. This looks fine. Let me print out my result. You can tell I got a couple as a wizard and here I have shoe bomb. And if I print or just a desert, you will get this answer in a list on then, inside that you will have a couple. So that's how SQL query. Well, now you know how to select columns and how toe pass out of condition. You suppose I need name as really Sally off the employ Whose department, despite on so all after do is used name on. I also require salary. These two columns are required by me and then I need to pass out my condition here. The condition is the department should be equals to fight on. Let me bring this one. Now you can say you got a result that is shown and 75,000. So this is our SQL query to select daytime fed street at work and I hope you understand about it. Don't worry. We are going to cover everything in our cantor application as well. So this is just a basic stuff that you should know on. You should be family. With that the next lecture. Let us talk about how to believe any value from our data Bees. 24. Delete Data - Database: Welcome back now in this lake Taylor, Just talk about how to delete anything from our database. So in the previous letter, we talked about how to fetch our data on you might have noticed that I have removed the comet statement. Why? Because we're not changing anything on our database while fetching data. I'm just taking data from my database and displaying out. I result. But I'm not changing anything. And my date of is so whenever we change anything in our database, whenever we mortify anything on our database, we use coming. If you're not mortifying, anything if you are extracting are fetching data. You don't have to come in. So let me come in the scored. Now, I have two cases for the lead. Either delete everything in our database. That is still it all on the second cases. I just need to delete a specific result. Extremism. There are thousands off reserved in our database. And if you want to delete any specific result, you have to use the same method that we're using for inserting, fourth fetching and for a bleeding. So, firstly, let me add 56 more reserved in my database. So you can understand the lead in a better manner. Changes done. So I've added three more result in my database. Let me the fresh this one. Hey, you can see now I have five prison. What I need to do is I just need to run a simple query to believe this fourth result. Maybe so. I would be using my cars are object, then execute. Then I need to pass a query called Billy from my table. Name there. I just need to pass out a particle. A condition so that Rome would be deleted. Remember, Heavier Modifying our database. That is, we're changing or removing off value from our databases. So I need to commit out my result. That's done. Let me run this one. He fished out my date of this. You can see both the fields are gone. That is my fourth and fifth because both a user named as sheen on here. If you want to talk about how to delete everything from our databases So I'll after this don't pass any condition that will solve our problems. That means delete from employees. So it would delete everything from our dead Amis. Let me run this one. I never You fresh my database here, you would see there is no reserve. That's how we delete everything from our database on. If you have any specific time that you want to delete that there's a specific result with a condition you can use that. I hope this lecture was helpful. So in the next letter, we're going to do a bit off interesting task. We're going to create a function to insert, delete, to obey, and also to fetch our data that would help us to shape our functionality regarding databases. So even if you are working with kinter application in future, you can create a function for insert. So whenever you want to insert any command, you don't have to repeat these lines off court All you have to lose just possible the perimeter in our insert value, that is an art insert function on. It would do everything by its own. So see you in the next one and let us complete our database activity 25. Creating Functions For Operation - Database: Welcome back. Now let us convert everything into some functions on believe it. Some perimeter. So if I want to create some table soon, start off using this particular table command, I can also use create table if not exist and then the table name. So I don't need to commit this one. So disc table is created and I don't have to worry on of this. Travel is not creative. So our program, that is our query is going to create a table with all the requirements that we have passed . So I just need to use create table if not exist. That's also this is done so I don't have to mess with this line anytime in future. Now, the next thing is, if I want to insert anything so let me create a function. Let me call. This one has in third value are add value are maybe add Employ something like that so you can use any off your name on hell. Let me and coming these on instead off these values What I can do is I can take these para meters so I can take idee name Salary department in position on instead of these values, I can just pass these perimeters. That would solve my problem. This looks fine. Now, the second thing is a five on toe update. Anything. So for currently, let me suppose I want to update department so I can create a function to update the apartment. So let me create that also oncoming these values. And here I can simply take our perimeter. So I will be using depth on simply passed this one here I will also need a I need to specify that that's done. Now if I want to delete something or if I want to fetch some data, I can simply create a function regarding that We'll be digging function name as a school. Fitch on Put them inside. Now here is the thing. I am currently passing some specific collar. Let me use all and also remove my condition so it would return me everything that is inside my data Bees. You can also create function specifically according to a requirement that is for your condition, Like we're doing for a day now. The next thing is truly so. Let me create a function so I would be taking your task. The legal suppose I need to insert some value in my databases. What I can do is I can just call this function, pass out my idea. So I would be taking it as well. Then. If I need to pass off my name, I would call it a shoe bomb. Salary, maybe as 80,000 then department, maybe a spite on and then position as developer. If I run this one, you can see I haven't got any error. And let me go back to my database. Here. You can see out my resign. So that's hard work. And it worked really well on if I want to delete anything or after do is use my delete or come on, let me down this one again. The official, my data vys that's done so had the reference or function. I'm talking about this just because in our killer application or in any other application that you're walking, you're going to create functions like this. So this solve a lot off our problem. I hope decision was helpful regarding the basics off database Also escalate databases from our next lecture will be talking about Kinter as well as SQL database and how to create a connectivity. I hope the city's wants handful seeing the next one under to start working again on our content application. 26. Connecting With Database: Hey, guys, welcome back to our killer application. I hope by now you are from livered databases and SQL queries. We need to perform four important queries that is insert, update, delete and fetch data. So we'll be performing that on our calendar application. First thing we need to Lewis, we need to change this list and missionary type indoor date Amis. So we need to connect our Esquire database with Arcandor application. For that, we need to start with importing our school, then creating our databases than creating our table. And then we need to move for though, So let us get started. The first step is to import our rescue light tree one status done. We need to connect with our databases. So let me Diego variable corn and then squeal like three connect. And I would be taking my database name. Ask wind or BB. Then with the help off corn, I need to create a car czar Object. I would be calling it. Ask ourselves over J. Once that is done, we are in good shape. And remember, once were important sq light. Once you have created a connection with your database, don't forget to our clothes statement. So just scroll down at the last after a root and you need to close your database connection . So just use your carcela object and close. And also you need to lose your connection. That would be called Remember, It is quite important. And don't forget to execute both off them. So if I run this particular file right now, I would be going to get going or db in my file A victory that is my by crypto Let me run this one. You can see our application is running fine. You can also see I gotta coined or db, which is currently empty. So I just need to shift all the state off into my kind or Devi. The first thing is what data we need to extract from rate of is so we need to store quite name price number off coin own on will be creating idea So all the later which are occurring representing additionally and list We need to shift back rest all the later we are calculating by our formula biologic. So if I talk about total amount Curren price profit, they lost Everything is calculated with larger all I need is thestreet data I need, So that would be quite simple. I just need to execute a creative equity. So all I need to use this my Carson object, then execute command, and then I need to write, create table, if not exist my table name. I would be using coin, and then I need to pass these four column. My first column will be I d, which will be a in teacher, and I would be a signing up primary key. Second will be my symbol on. I would be assigning it as a text. Then the third would be amount. I would be assigning it as in Poesia. And then price on, I would be assigning. Really? This looks fine to me. We have to have a coin table in which we are going to have the several items. And don't forget to commit all the execution that you're doing along with their databases. The next thing, we are going to do this we are going to replace all our current data with our database data are not currently our database will be empty. So let me under the media doctor, me with my course or object. Then execute mentor on Let me write my insult query That is insert in tow coin than values on. Then all I need to pass these four fields. That is my column, Fields. I would be taking ideas one than symbol as Bitcoin for BTC among will be too. And then prize will be 3 to $50. And don't forget to commit all the execution that you're doing along with their databases. Once that is done, let us run our program and add some dummy data. Things goes fine that we close this one on. Go back to my Devi browser here. You can see we have our data. Now, this is the data that is in our d ws on. Currently all the data which were fitting is from Leicester. Conditionalities from the next. Like Taylor does improve the system. We need to fetch data from our database and remove all this list. Additionally, system are currently in this lecture. We executed some data I read or dummy line. Let me to move this one on in the next lecture. Let us fix all this thing. So see you in the next one 27. Fetching Data From Database: Welcome back, guys. Find this lecture. Let us fetch our data from our database. Before that, let me at some more. Did I? My database. I realized one field will be quite less so. I just started these three lines. That is insert. We can do well, query also, but I am doing the simple thing. Let me execute this one that's done on. If I go to my database and the fish, this one you can see we now have four items. Now that's fine. We have added these values. Now let me lead these. So here I am. I have this coins in which all the data stored with the help of our list conditionally. So let me remove this one on installed that Let me fetched it out from my date of his. Make sure you follow this carefully because we are going to do a lot of changes. So all I need to do is firstly fetch my data from my database. So let me with my car, sir. Object and then same execute matter on in which I need to pass. Selects star from coins. One status done. All I need to do is you special. Come on on store everything in my corns. So now already dies inside this corns on. If you want to confirm this, we can print this one. So what? I do this you spring. Come on. If I tried to run this one, I'm going to get better, because now we don't have this coin symbol. It could be something next position. So let me run this one. See later on, see what output we are going to get. Yeah, we got our era, but this is the result that we're getting from our coins. So we have some index position and inside that we are different and exposition. That is totally fine. So what? I'm going, Louis, we have troubles inside our list. So all we have to do is what we are falling previously with our additionally, we need to do same with our trouble. Let me remove my print statement. So this statement is going to capture my first element off coin. Then it read through it, then second eliminate than it read through it. And so on. Now, the thing is, we were using quite symbol for our dish, MITI's, but hell, we need to use in exposition now, zero tendex position is for Eylea Foster and exposition is for symbol. Second and exposition is for the amount of coin. Your on the garden exposition is for price. So all we need to do this, we need to replace this thing. So wherever I am going to use this coin symbol, I just need to replace it with wine and then the first and extra vision. So let me some simple replace command. So instead, off Mike Wein symbol, I'm going to use coin and then forced in its position. He plays all now we have our coin owned, so that would be replaced with in exposition Second. So I need to replace all now the garden is the price I have paid. So it would be replaced by in extradition hard Andi place All So all the values we truly are showing now would be from our dean of is let me on this one and see if I'm going to get an error. This work flying therefore coins that is BTC e th exam are and new on this is working Fine . Now what we need to lose we need to act some functionality without Cantor application, so that would be our next step. So we need to act, feels toe, take data and then added to our database. So we need to create feels so we can enter the state are click on an ad coin bottom so that that I would be saved in a database. So before that, we also need to clean up our cord. Andi, we'll be starting with all this ardent delete data from one next lecture. So see you in the next one. 28. Modifying Current Application: we'll come back to a new lecture. Now, in this lecture, let us fix some issues on also modify. Some are far scored to make it in proper form, man. So are currently, If I run my application, I just need to do a few things. So I just need to modify this update name and make it three fresh How to need to our total paid amount here. I also need to showcase my portfolio, I d. So that would be useful and future terms. So if I have 10 or 20 coins, I have a port for your I d. So I can look at that and yeah, there would be quite some hair and their changes, so let us focus on that. So firstly, I just want to take this function on, put it inside that stuff. I also need to do one important thing. Let me have a new function here, quality as application herder and just moved the school inside that so it will be more convenient for us if we need to change anything inside that because and for the lectures, we are going to go a lot off changes without application. I also like meeting this one to really fresh on. There would be few more changes regarding our calculation. So this is not the proper manner. Earlier I was doing just to make you understand our calculation, that is our tradition on I would recommend you to remove that and use this. This is the proper format. Actually on. I would really recommend you toe do these small changes. Once that is done, I also need toe calculation for total amount here. So we have Toto current value Tonito total amount. That should be easy. We just need to use our total Peter home. We just need to for this column. All I need to do is you This quarter. I need to use total among peers. This looks fine to me. Don't forget to change your column number. Let me close this one. And this again. Yeah, that's fine. So this is the moment we have appeared. This is our current value on this is our profit. We have changed our update, foodie. Fresh on. Also, we need to add one more column. I don't You call him here? I would call it as portfolio. I d. One thing you need to do issue also need to update all the call a member because you are adding a new column. So just you place this quickly. So we have added to our header we now need to our with our values column. So if you remember, as I said earlier, it would be coined and then the position number that is indexed number zero. We also knew Coach in the value off this column Now think looks fine to me on if I run my application again So these are the changes on we have a boat full of ideas. So now if I need to talk about neo, it would be at a position number. That s portfolio I d. Number three. If I talk about X m r, it would before, so these are not in sequence, but they have no idea which we can refer. So if I need to be lead anything, I can refer to this particular i d. Because this is sync with data V's were taking decided from database. If I need to edit this one, that means if I need toe update anything in my portfolio, I can't afford to this particular I D on this is going to solve a lot of problems for us in future. I hope I understand why I done these basic changes because it is going to make our application easy to use on. Also, it is going to make us easy to court our application. We need to do a lot more thing inside our application and the next excellent US focus on insert, update and delete. So I would be adding three fields in my application at a particular position so we can just enter data and click on art button and we can our data and our data viz, that would be quite interesting, So see you in the next one. 29. Adding "Add Coin" Button: Welcome back, nine. This lecture I need toe are the field call Add coin to do other point. We need three things we need symbol. Then we need price Onda number off amount we own That is the number off among the board. So I would be adding these three feels and then I would be adding a button called art coin . And once user click on this particular Burton, it would be saved 40 degrees. So we need to create a function also. So take some input. In our Kinter, we have a method called entry on. We just need to set our great position. So just do that on then We need to do same for update. And also for daily. Here is our message. Or don't worry before ending off the scores, we are going to improve a lot. On this is the end of the loop. I think I should add something here. That would be fine. So do our data. We need toe three and two points. Let me explaining for us the force would be a symbol. I will be taking the mask symbol and a score. Txt. I need to use entry this is our entry matter and minuto pass our fruit. That is our by crypto. The second thing would be my border. Where time? Something I need to pass. So I will just use simple border with it. Once that is done, I just need to sit great for this. So this one is the last queen room on. This is plus one. So we need to add at this point, these three will be the point that a coin price number of going own and I would be adding at coin here for who will be last one on our column will be forced. Let me run this one on, see what we are going to get. This is the first space. So this is for symbol. I need to replicate this for next to Don't forget to keep a track off your column. And then we need to add a button. That button would be at coin. The movie also need to write a function to add functionality. So that would be our coin. This would be Iran about three. That this would be wrong. Number four on it would be calling plus one on head. I would be calling a function cornice. Insert coin. Let me write Insert coin, which will contain our SQL query. I can simply defined a function here on this would include I school query. Let me with my Carson object and then execute. That is done. I just need to use insert in tow coin and then passed my symbol prize and amount and then use values on to stop some injection. Something to keep my database. If I would be using caution, mark in the couple and then you need to pass the entities that you need to be careful. So here we need to pass a couple now to get the values that are stored in this particular field. We can actually use a get matter. So all we have to do is use this particular field. So this is a symbol feel, and I can directly past this field here and use my get mental. This would help me to face the date are directly whenever I am going to call this insert coin matter. So if I have three feels I just need to pass these values in the stubble. This looks fine. Don't forget to add a comment that stunt. Let me close this one. And you fresh my application again. So here we have our coin method latest Chester functionality. And later you can change the color formed and whatever we need to execute. But firstly, I just need to check its functionality. So let me add a new coin. Say being be It has been lance coin approaches that. Then our next meeting. Five point only pick on our coin. There was a blink behind the scene. Let me finish this one. So I got mine being Bitcoin, which is pretty good, but we have this issue. Why? Because we are not clearing our intern application. So what happens when we click on update when we click on a date? It recall dysfunction. So it really right? All right, Everything toe my previous code. That is my previous function. So if I have something executed here, it just rewrite over that. So I need to fix this. One will be doing that later. But now I know I can add a coin to fix that. We'll be doing something later on, but I need to add a Bitcoin and also delete coin. So the next lecture first let Assad of Bitcoin and delete coin and then focussed on that tree. Fresh matter again. I know this is going to mess up a bit, but if we are going to work on a project, we need to complete a functionality and then fix it side effect. So see you in the next one and let us execute, update and delete functionality. 30. Adding "Update Coin" - "Delete Coin" Button: we'll come back now. Let us quickly jump. Fan are update and delete functionality. So update Quintal require full fields. Actually, it would require on portfolio i d. As a less kind name prize and quite known. The portfolio idea would be for our condition on the least. See things if we want to update anything. So let me take them. So let me cope with this one. Having you toward it, everything carefully. The first thing we need to evidence. I need to increase the number. Then this would be a portfolio idea. You need to use a unique name. I know I'm going to miss a lot with names, but be careful with that. This would be our symbol. I just need to write it as a big also this prize, and then this will be done in tow. Amount of dead one status done. Also, don't forget to change your techs and then your function on here. I ever name it as update coin. One status done. Let me jump back to my top and add update Quinn function. So all I have to do is create a function of the coin, Then use my cursor again then execute Mentor on inside this, I would be using a command call Abdic coin. Then sit. Then If I need to change anything like my symbol prize on a month and then I need to pass my condition. That is, we're on the i d one status done. We need to pass the entities that is are four entities. The 1st 1 would be our symbol, price amount and then our i. D. So all you have to do its part suitable. And then you have to remember their names. So it would be a symbol of the price, A bit amount of date and then the bold idea big. Once that is done, don't forget org or commit. This looks fine to me. Let me run this one. And then we need to our delete functionality. We now have a big toe. Let me update are being be so if I take five s my idee on then symbol as being be so we have bought being be a 10. So instead off using five point, let me use it as three coin on a B. Now I need to be fished. This one. So it's No. Three coin on. We have fixed this one. I just come back to my database. Here we have five. He fresh this one. It's street. So that's how we can do update. Let me also add delete functionality. But remember for delayed we just need the i. D. That would be our poor tidy. I just make it does plus three and also change calling 20 on that before so basically been worlds lot off manual reading. At this point of time, there are chances that you might get bored. I would recommend you do just follow along with this because this is man. Where does the next thing is? I have added just really functionality. So I just need to add or delete function on her. Insert off that if you need to delete something, just need to use a query called Delete from Coin that as our table name, where I just need to mention my i d. So it would be old I really delete. And on don't forget to add a comma and then because this is a couple on, if you're not going to add a comma, one element would not bto stubble. It would be just inside that bracket. So don't forget to add a comma at the end off our first item. This one again on suppose I need to relieve the coin. Maybe being me on, they need this one. He Festus again, Don't forget this mess. We'll be clearing that. But currently, yeah, I have deleted that you can hide this layer because this one is from a previously er that is our previous result on these four are updated result. If I go to my database, the fresh this one, we now only have four. That's fine on in the next lecture, let us all dismiss because this one is currently creating a mess. It is all writing our previously er So what? We need to do this. We need to do some functionality before refreshing before updating. We need to clear a window and then or what I that so that would be empty. We know. I hope now you understand the functionality off. Insert coin update coin and delete coin in the next lecture, the spook us on, clearing our screen and then refreshing it. So that would be our simple task to create a new function. So see you in the next one on. Good to see that you are falling the cities to create your candor application. 31. Solving Multiple Layer Issue: in this lecture alert A sore arm s that we have created. We are all writing Liro earlier. So if I perform to your fall from Kennedy, it is goingto be quite confusing in our application. Why? Because we are not clearing the previously. So the first time I create my portfolio it created a layer on my kinter application. Now the second time and I click on the fish called my function called my portfolio. So again it is going to create a new layer over. I think our previously then effect like the free fresh third time it is going toe create a mess because it is going to write new earlier. Who are my previously er so that is the problem and we need to solve this one. So what I have to do is firstly, I just need to remove this one on this big new function. Maybe call it as visit org fresh. Something like that inside that we would be doing experiment, so I would be calling it as reset. You can call it as refresh or anything. And now we need to write a reset function. So remember one thing, research will include us dysfunction because that currently the freshest calling this particular function. So just writer death reset on. Then just call this function. That means we haven't changed anything in our application instead of this I'm calling this on it is doing the same task. So if I run this one again so on support, I believe three. Believe this quien you fished this one, You can see what a mess I'm talking about. So it is doing the same task that currently because I'm calling this function also one thing now I don't need to call only dysfunction. I also need to call the other one that iss my header. Otherwise, in some cases it is going toe right This also So I also need to call my header with that isn't now the next thing I need to talk about this how I'm going toe clear up my window. So there is a method called destroy which actually do a simple dust. It destroyed all the bridges that we are applied. So let's try our labels, destroy all the fields that were using and destroy our buttons. So destroy basically everything anarchy, entire application. So for that, I need to use my window. That is my route window. And then there is a function called Win four under school Children. Now, this contain all the windows that we have. So all the windows that we are dealing with us inside this So what? I need to do this. I need to retreat with death and destroy each one. So I would be using a for matter and call them free and then destroy each frame. Once that is destroy, I would be using these two methods to recreate my application. That means I'm currently just destroying each 11. That this each frames and this is a frame. This is a frame. This is a frame. I'm just destroying each frame. You can name it as we know You can name it as frame. You can call it us cell. That would be more fine. So I'm just destroying, eat, sell. Once all the seller destroy, I just rewrite my whole application. So it is not going to create a mess to these are the two methods that I'm calling if I have a hermit third there. I also need to add that third matter and my reset it. We close this one on DSI if our experiment is going to walk. Okay, So let me delete anything, maybe fooled. Click on delete. He fessed this one. Yeah, that's what Fine. While because I destroyed all the elements. All the self from my previously er Then rewrite my completely. Now, this is fine. We now have a capability to our coin update. Coin delete. Quaint. Also, we are fetching our data from our database on. We have a valid three fresh button. Now, the next thing I've worn from my application is. So whenever I delete any point, you should threw me a poeple message or a notification that this coyness deleted successfully, or whenever I delete any coin or update any point out at an equine, my applications should re fresh automatically. I should not go to refresh for them. So suppose I deleted this queen Trudy fresh automatically. There should be no case that I have to go refresh. That should be only done when I need to update my price. So that would be quite simple. All we need to lose once we do commit call our research method. So that would be quite simple. Once we execute and commit. I just need to call my reset function different sort of our problem that we close this one . Our new queen, maybe adding the tedium again. Yeah. This work on now we don't have any mess. These all other fields that we required. So this looks pretty fine. One thing I was talking about, remember, I need a pop up or notification that can solve a lot of problem. So in the next lecture, let us Arab opal functionality that we have with Kinter. So we call it as message box from the next lecturer decide our message box. So whenever we do anything, we can show user a notification that we have done this particular tasks successfully. I hope these lectures are easy to understand. So see you in the next one. 32. Adding Notification System - Popup Box: Welcome back as talking a previous lecture and this lecture. Let us focus on that Pop up that message box. So all your producers the hosting is you need to use your cantor and then import message box. Once that is done, now we can use message box to showing for so it takes to Perimeter. The 1st 1 will be our title that is pop up tighter and the 2nd 1 would be its content. SoBo book titles will be portfolio notification and then the content will be, Quinn added successfully, because I'm adding, inserting a coin in my database in my portfolio. So I just need to add Quien added to portfolio successfully let me test this one and then I can replicated with all the other burdens. Let me add BNB So I've got a notification from my portfolio. It is Quinn added toe portfolio successfully and I just need to click OK on it is you fished so this is quite easy, simple and give a better user experience. I just need to copy this one. Things looks fine. If we close this one on, let me on this one again. So if I delete this to deliver larger notification application. What? We fished that me Adamu coin maybe did it again, understand? 1 10 5 point again. This looks fine. I can also do one small change. I can use this message box after my re fresh functionality. But that's okay. We are now able to understand everything. One thing I need to talk about. Message boxes that are different Message box. You can ask question. That would be yes or no. You can give a successful message. You can give a warning on all their different things. So there are different methods. Like ask ocean. Ask your so no us. Yes. No. Canceled and ask. Okay, Cancer, then retry. So these are all the mattered without message box. So that's done for this lecture in the next lecturer to stalk about how to add a menu. That is how you are a navigation bar. So maybe we have a close functionality or clear all functionality cleared. It'll be something like that to our navigation header. So that's all for this lecture in the next lecture, let us experiment more thing on, understand more about Kinter on to make our application better. Thank you for falling this lecture. See you in the next one 33. Adding Navigation System - Menu Bar: Welcome back. I'm just left killer to stalk about menu. We execute anything letter to menu. We need to import menu from our can't. A model for all you need to do is use me new on. That would be the first step towards adding on navigation. But the second thing is, let me create a function on our A structure doing so in war. Few mattered in all. Few function on everything would be inside that my third. So it would be quite easy for us to demonstrate that. So just create a function called a navigation. Now, the first thing I need to do is I need to take our video by quality as menu and then I need to use menu matter that I have imported. So this is menu class on Dhere. I need to pass my route. That is my pipe crypto. Remember, this is a structure that we need to follow. Do our menu now on status done. I need to create a item. So what would be item? So I don't would be if I have filed. So that is an item. If I have edited, that is an item. So if you talk about any application if you talk about anything. So they have different items. So let me create an item here. I recorded us fight. I don't. And we need to bazaar menu here. One status done. Now, everything I need to add are all the different matters that I need to add in my file. That is my file option. My file item. I need to use a common call, add command and then give it a label. So I need to are different menu. Maybe the first menu would be clear. All the second menu would be close up. So the clear portfolio and close up. So let me use a label. The second thing we're going to lose, I need to use my menu and then add Cascade on, give it a name. So I need to give a name to this item, pass out the label in which I need to give the name. I would call it as file on to Richmond. Knew that would be my file item one status done. I just need to configure it with my menus. So this is quite confusing. Don't worry. Before ending this lecture, I would be clearing all the notes. So use my windows. That is my by crypto and then use my configuration. Yeah, that is Well, I hope this looks fine. Let me run this one. Okay, so I haven't added this actually. So I just did toe my Abner to reset as well s as well as in the mean window. Let me down this one again. I have a file option. I have clear portfolio cruise up on. They're going to do nothing on. If I did, you finish anything. It's still valid. We have option called clear portfolio and close up, but they're doing nothing. I just need to add a commander functionality. Tow them on. They would work fine. So that's how we need to add a menu that media wise it one for you. So we need to take a radio able in which we need to pass out our window, then use this method to create an item. Then this item can be repeated many times. So in the side of my added clear portfolio, close up and then added, decided to my main menu and then name it as with help off label and then configure it So if I need to add a second item, maybe I need to add are headed. Or maybe I need to add a help. So all I have to do is use this metal again so it will be help item. This would be helped. And then all the different type off, drop down menus on and then here it would be held by down on. Then you Can I write help? That would be done quite easily. I hope this was understandable. I just need to do one simple task. I need to create two commands. The 1st 1 would be for my player portfolio, in which I will delete all items that are every label in my portfolio that is deleted them from databases. So I just need to use command andan call a function called Clear on. And here I need to use command and then call a function close up How? I need to write these two functions. So let me was clear. All on right here only. So in clear or what I'm going to lose. I just need to believe everything from databases. Just use my object execute method delete from coin so that would believe everything. Then commit that Send a message regarding everything is deleted and then all have to do. Is he stated that is refresh my particle. Have window. This looks fine. The next thing is I need to add a function called close up that in this I just need to close my application so I can use dis try. So if you remember to destroy frame, use destroy matter Similarly I need to do with my windows. All I need to use is my window name. That is my route. And then destroy. This should work fine. If we run my application first and see if I'm getting any better. Know if I go here, lose my application. That's what plane from my application again. Go Hair clear portfolio. Okay. It should be fish. Now I have a banquet for you. Let me add more coins. Maybe two coins at this Quyen goin at it again. It should be fresh. Yeah, that's done. So that's how our old fool your application is working. And I can really use this one to track some data. And I can also use more formulas, more fields to get me some indication on this looks particularly fine. You can also add more menus. As I said. So this is our portfolio application. I hope now you understand a lot more about Kinter by tone as well. Is writing everything from scratch. We can do a lot more knitted with this, but accurately, I think this is sufficient as a good basic project regarding Kinter. And I hope you understand about this. I hope not Understand About Kinter. SQL databases fight on. So that's all for this lecture. I hope this course was helpful for you. So start a journey with Kinta. Thank you for following this course. See you in the next one. 34. Thank You For Being Here!: Hey, guys, Welcome back. Glad you released this lecture. You reserve a pizza or maybe a short break. You just unlock a new set off skill by completing the schools. Thank you for choosing and believing me. If you like this course, don't forget to leave a review. Your review. Keep me motivated to work hard. A big lake just as relus add more lectures on a regular basis. Thank you for falling. See you in the next one.