Flask Web Development Notes--Introduction

Source: Internet
Author: User
Tags diff git clone git commands

Flask is a lightweight Web application framework written using Python. It is based on Werkzeug WSGI Toolkit and JINJA2 template engine. Flask uses BSD licensing.

flask is based on Python's flexibility and provides a simple template for web development. Demo:flask Community

flask is also known as a micro-framework because it is simple in its core but good in extensibility. Flask does not have a common functionality that exists for third parties, such as database tiers, forms validation, and so on. Flask extensions can use these features just like the flask implementation itself. Extensible Orm (Object-relational mappers, Object-relational mapping), form validation, file uploads, various open authentication technologies, and more.

The author of Flask is Armin Ronacher. It was only an April Fool's joke for the author, but was later popular and became a formal project.

Features are as follows:

    • Built-in development server and debugger

    • Integrated Unit Testing (unit testing)

    • RESTful Request Dispatching

    • Using the JINJA2 template engine

    • Support for secure cookies (client side sessions)

    • 100% WSGI 1.0 Compatible

    • Based on Unicode

    • Extended documentation

    • Google APP engine Compatible

    • Available extensions add additional functionality

Objective

Flask and other frameworks, developers can control applications in a completely and creative way.    When the scheme is unofficially supported, most frameworks need to be "struggling with the framework", such as different database engines or user authentication methods, which can make people headache. Flask supports all relational databases and NoSQL databases. It is also possible to use a database engine that you develop or a database at all.    In flask, you can choose your own application components or even develop your own. Flask is designed with extensibility in mind.    Its robust core encompasses the basic functionality of Web applications, while other features are provided by a large number of third-party extensions in the ecosystem. This book describes the workflow for authors to develop web programs using flask.    Attention is not the only correct way. Most software development books use short and concise sample code, and readers need to consider the combination of features themselves. This book is based on the social application of blogs to expand.

Directory

Flask Web Development by Miguel Grinberg (O ' Reilly). Copyright Miguel Grinberg, 978-1-449-3726-2.

The first part: Flask introduction

    • Installing and setting the Flask framework

    • Quick Start

    • Template

    • Web Forms

    • Database

    • Email

    • Large and medium application structure

Part II, social blog app Flasky

    • User authentication System

    • User Roles and Permissions

    • Profile page

    • The interface of the blog

    • Concern

    • User reviews

    • Api

The third part, other:

    • Different unit testing strategies are described in detail.

    • Overview of performance analysis techniques

    • Deployment

    • Resources

Code

Some common git commands

$ git clone https://github.com/miguelgrinberg/flasky.git $ git checkout 1a# with git latest file sync $ git fetch--all$ git fetch--tags$ git reset--hard origin/master# compare diff $ git diff 2a 2b

Note 1a represents an instance of the first chapter. For example, the fifth Chapter 5a, 5b. Git reset--hard will discard local modifications and restore the default configuration so that files can be downloaded from the server. Comparing differences can also be web-based, such as HTTPS://GITHUB.COM/MIGUELGRINBERG/FLASKY/COMPARE/2A...2B.


Resources
    • Comparison_of_web_application_frameworks

    • Flask Web Framework


Flask Web Development Notes--Introduction

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.