Introduction to flask framework in Python (extension package)

Flask was born in 2010 and is a lightweight web development framework written in Python by Armin ronacher (person's name).

Flask itself is equivalent to a core, which mainly implements routing distribution and template rendering functions , which are respectively integrated from Werkzeug and Jinja2 module packages, which are also the core of the Flask framework.

Although the core is streamlined, Flask provides a very good extension mechanism, and various requirements in development basically have corresponding official/third-party extensions that can be implemented, and it is even simple to implement it yourself.

Flask commonly used extension packages

Flask-SQLalchemy: ORM operation database;
Flask-RESTful: tool for developing REST API;
Flask-Session: Session storage;
Flask-Migrate: manage migration database;
Flask-Caching: cache;
Flask-WTF: form;
Flask-Mail: mail ;
Flask-Login: authenticated user status;
Flask-OpenID: authentication;
Flask-Admin: simple and extensible management interface framework
Flask-Bable: provide internationalization and localization support, translation;
Flask-Bootstrap: integrate front-end Twitter Bootstrap Framework;
Flask-Moment: localization date and time;

Environmental installation

# 创建虚拟环境 
mkvirtualenv flask_env -p python3
# 安装flask包  
pip install flask==1.0.2

For more content, you can look at the official document.
Click me to see the official document.
Click me to see the Chinese translation.

Guess you like

Origin blog.csdn.net/li944254211/article/details/109266401