-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathFlask.txt
24 lines (19 loc) · 1.14 KB
/
Flask.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
Flask is a web framework that provides libraries to build lightweight
web applications in python.
It is developed by Armin Ronacher who leads an international group of
python enthusiasts (POCCO).
It is based on WSGI toolkit and jinja2 template engine. Flask is
considered as a micro framework.
What is WSGI?
It is an acronym for web server gateway interface which is a standard
for python web application development.
It is considered as the specification for the universal interface
between the web server and web application.
What is Jinja2?
Jinja2 is a web template engine which combines a template with a
certain data source to render the dynamic web pages.
__name__ represents the name of the application package and it's used by
Flask to identify resources like templates, static assets and the instance folder.
__name__ is just a convenient way to get the import name of the place the app is defined.
Flask uses the import name to know where to look up resources, templates, static files, instance folder, etc
if __name__ == “main”: is used to execute some code only if the file was run directly, and not imported.