Python w/Flask

@Flask-Python-ML

Public team

Community (0)
No community contribution yet

Joined on Sep 10, 2021

  • So now we went over what the 4 pillars are and we did use classes but just what are they? How do they work? What are they used for? Blueprints: This is how we will need to start thinking of classes. When we were creating dictionaries we were basically creating a class. Each class has 1st a name to call it by like User, Dog, HouseAlways capitalized After that we need to set up attributes. These are things that the instances (each object) have. Like a User has the attributes of a name, age, email for example
     Like  Bookmark
  • Links Python Fundamentals Python OOP MySQL Flask - Pre DataBase Flask - w/DataBase Pre LogReg Flask - Full Stack Slides
     Like  Bookmark
  • Links Python.org YouTube PlayList Github Organization Class Repository Terminal, Git, and Github Terminal & Git Commands CheatSheet LESS
     Like  Bookmark
  • There are several steps to creating a good ERD. Click the table icon Click anywhere in the grid to place the table Double click the table to open the information section and rename the table Click the AI check box Make sure that the column name for the one you just checked is id Now your not done but your first table is now created. Next we need to create each of the feilds that will be a part of that table Remember that these feilds are what we put in the init section of our class (with a few additions like id and createdAt and updatedAt)
     Like  Bookmark
  • For the rest of our Python stack we will be using the workbench a lot. It becomes our database and how we create them. So here are some images to help navigate the workbench Creating your Database So creating your database sounds hard but with a few images I think you will be good to go. From this 1st Screen shot once you click that You should see the following screen Click that top + to add a new moddle One the next screen you will want to then double click mydb and rename it
     Like  Bookmark
  • So guess what we can do? Before we even get to Flask and have a front end we can still make our application interactive. For this one we will have a link to to the repository vs python tutor. Simply clone down the link at the end and run the game.py file. The link to the code is below. But take a look through the code first before you run it. Terminal Game Repo
     Like  Bookmark
  • Just what is OOP? Object Oriented Programming thats what. Ok but whats the big deal Well when used right it keeps you from repeating code. And keeping your code more organized 4 Pillars of OOP
     Like  Bookmark
  • If you don't like loops and conditionals sorry, but this is a fact of a programmers life. It is just something we have to do. Looping through data and checking to see if something is there or not just happens to be a part of your life now. Starter Code: data = [ { "house": "First House", "floors": [ { "floor": "1st Floor", "rooms": [ {"room": "Living Room", "contents": ['couch', 'TV', 'painting']}, {"room": "Kitchen", "contents": ['table', 'chairs', 'stove', 'fridge']},
     Like  Bookmark
  • So last chapter I talked about setting things up and how to print strings. But as I am sure you have already guessed that is not all we will be doing. So on to the next. List: A list you say? What this is you ask? Well here is what they look like aList = ['Item 1', 'Item 2', 'Item 3'] emptyList = [] numberList = [1,4,5,6]
     Like  Bookmark
  • System Set up Python installation Step 1 - Check to see if you already have it Is Python already on your system? Check by using the following commands (try each one just to be sure): python --version python3 --version py --version On some computers with python 3 installed you will get a version back for both 1 and 2. Some computers will only give a version using 1 of the 3. One of my computers only responds to py, however most will print a version number for python or python3. So if you see a version number then procede to step 3
     Like  Bookmark