Flask Flashcards
What is Flask?
It is a server technology. It is a web framework. Django is a framework.
What is a virtual environment?
A folder where you can place all of your information and can hold all projects for that instance. It’s going to store all the software for me
A virtual environment is a clean python environment
When I install Flask why are there other applications that need to be included?
Needs them, dependencies
What is a framework?
It’s a standard structure for how to implement a software project. Contains both the tools needed to do repetitive tasks and then may generate needed project files as well
What is a microframework?
Like a framework but for a minimalistic web application. Less complex than a full stack framework
localhost: 5000
It is a localhost What is :5000…it is a port .
It is like a lane of a highway that all of your traffic is go over. you can change if you want to
What are routes?
Important way to interact with website. It is anything after our .com..THAT”S our route.
Multiple pages at each route. Jinja2 renders our templates for us.
@app.route(“/route”)
What is a static file?
To link to static files we can create a new folder called static. In order to keep the static folder organized we can also create subfolders for css, js and images
Organize your static folder
Review: What is a primitive data type?
Integers, strings, and floats
Review: What is a data structure?
List, dictionary, tuple
Review: What is OOP?
Create objects based on classes and assign attributes and methods to them .
Flask, also what type of framework is it?
Simplicity to build a server, it’s simplicity is why it’s good to learn first as a framework
Flask is a micro framework
What is a template
Something generated in Flask that you can send back as a simple HTML document
What are the key topics you should be familiar with regardless of technology?
Routing,
Clint server cycle - simplified to a degree in Flask. Understanding how it works now will help…which action triggers which events, and what happens when a client makes a request.
Database connection - Every app must connect to a database
What are some concepts we should always focus on when learning flask?
Rendering templates, redirecting, form data, get & post requests, session