当前位置:网站首页>P7 Day1 get to know the flask framework
P7 Day1 get to know the flask framework
2022-07-27 08:29:00 【qishaoawei】
1.1Flask Introduce
Flask Born in 2010 year , Use python Language based Werkzeug The lightweight tool box Web Development framework
Flask Itself is equivalent to a kernel , Almost all other functions need to be extended ( mail :Flask-Mail, User authentication :Flask-Login, database :Flask-SQLAlchemy).
Flask The core of Werkzeug( Routing module ), Jinja2 template engine .
Flask Of " light "
Flask Of " light ", Does not mean that its function is not powerful enough , Flask With rich extensions , It relies on extensions to add functionality to applications , Many plug-ins provide database integration , Form validation , Upload processing , Various open authentication technologies , Flask These characteristics make it in web Development has become very popular
# Be careful : If you build a large project , Use many extensions , Flask Will also change with Django Same weight .
Preparation before installation
install Flask
Install in the black window
pip install flask==1.1.4
Build a virtual environment
Within the project 

Click ok to complete
Then start the virtual environment at the terminal
activate start-up
( When typing, you can click tab Automatic completion )
After starting, you have to return 
decativate.bat It's closing 
Installation dependent
After configuring the virtual environment, you should also configure the dependencies required for installation
First import what you want to install , Then open the terminal for automatic installation .
It's fine too pip install Manual installation 
Flask To configure
Create within the project app.py File
Note that it can only be app.py file name ,app2.py The file name cannot be recognized 
Load... From the configuration object
create a file , Configure objects inside flask To configure 
Load configuration from file
create a file , Direct configuration 
Factory model and APP Encapsulation and Flask route 
create a file
Packaging function 
Create another file to import and execute 
Another way to open 
边栏推荐
- 如何在qsim查看软件对象的实例?
- MCDF顶层验证方案
- OPPO 自研大规模知识图谱及其在数智工程中的应用
- Massive data Xiao Feng: jointly build and govern opengauss root community and share a thriving new ecosystem
- QPushButton 按钮的创建与简单应用
- Flutter 渲染机制——GPU线程渲染
- Prevent cookies from modifying ID to cheat login
- pytorch_demo1
- OSI seven layer model and tcp/ip four layer (TCP and UDP) (notes)
- 开怀一笑
猜你喜欢

The third letter to the little sister of the test | Oracle stored procedure knowledge sharing and test instructions

Oppo self-developed large-scale knowledge map and its application in digital intelligence engineering

ERP production operation control Huaxia

Vcenter7.0 managing esxi7.0 hosts

Dasctf2022.07 enabling game password WP

Graph node deployment and testing
Development of three database general SQL code based on PG Oracle and MySQL

Element display mode: block level, inline, inline block, nesting specification, display mode conversion

好吃难吃饱七分为宜;好喝难喝醉三分为佳

OSI seven layer model and tcp/ip four layer (TCP and UDP) (notes)
随机推荐
QPushButton 按钮的创建与简单应用
Element display mode: block level, inline, inline block, nesting specification, display mode conversion
How to view instances of software objects in QSIM?
Data extraction 1
Leetcode56. Consolidation interval
Notes in "PHP Basics" PHP
虚拟机克隆
JS advanced knowledge - function
Using ecological power, opengauss breaks through the performance bottleneck
[MRCTF2020]Ezpop 1
Process control - Branch
Is redis really slowing down?
List delete collection elements
Installation and use of beef XSS
Chapter 2 foreground data display
Map structure
On Valentine's day, I drew an object with characters!
Stored procedure test 1 -- first acquaintance of love
The response of the database interface is very slow
Solve the problem of slow batch insertion of MySQL JDBC data