What are the good Web frameworks of Python?

Source: Internet
Author: User
How about pylons? How about pylons? Reply: for beginners, step by step is the most important. I recommend learning Flask (Welcome | Flask (A Python Microframework) )
Flask is very light and can be used to develop a simple website at a very low cost. It is very suitable for beginners to learn.
After learning about the Flask framework, you can consider using plug-ins. For example, you can use WTForm + Flask-WTForm to verify form data and use SQLAlchemy + Flask-SQLAlchemy to control your database.
BTW: developed based on Flask.

In addition, we will briefly introduce other frameworks:
1. Django. As mentioned above, it is a comprehensive framework. At present, Django is widely used and has a learning value. However, it is not recommended for beginners to learn it. As there are too many things to learn, it will be hard to absorb and lose interest at once. Of course, Django aims to enable developers FastDevelop a website, it provides a lot of modules, of which my favorite is the admin module, http://your.site.com/admin It enters the background of the website (built-in OH ~) It is convenient to operate data, and so on .... Therefore, if you are familiar with Django, papapa immediately writes a website prototype.
2. Tornado. The legendary high performance framework. Tornado is a good framework that supports asynchronous processing. This is a feature of Tornado, which is not supported by other frameworks. Another point is that Tornado's design seems to focus more on RESTful URLs. However, Tornado provides the basic modules required by the website, and the remaining modules need to be expanded by the developers themselves. For example, in database operations, although a database module is built in (later independent, it is now called torndb, bdarnell/torndb · GitHub But it does not support ORM. It is difficult to develop quickly. If you need ORM support, you also need to write a layer to associate SQLAlchemy with Tornado, and there is a pitfall here.
BTW: zhihu is developed based on Tornado.
3. Bottle. Both Bottle and Flask are lightweight Web frameworks. But Bottle seems to have fallen. I think it has something to do with his API design. I personally think that Bottle is not so easy to use, so it is also used less. I will not introduce it too much here.
4. web. py. It is also a very lightweight framework that is rarely used and is not described.
5. web2py. I didn't describe this framework on the building. This framework is developed by Google based on web. py and is compatible with GAE. The performance is said to be very high. I used him to make my own homepage, and it feels pretty good. The disadvantage is that the expansion support is not very good, and you need to expand it yourself.
6. Quixote. Famous DoubanIt is developed based on Quixote. Unlike the above frameworks, the routes of Quixote are somewhat special. In addition, Quixote performance is also said to be good. Come on, write one by yourself: no more than 1000 lines of code

Http://www.liaoxuefeng.com/wiki/001374738125095c955c1e6d8bb493182103fac9270762a000/0014023080708565bc89d6ab886481fb25a16cdc3b773f0000

Then paste the source code, 1500 lines, half of which are comments:

Https://github.com/michaelliao/awesome-python-webapp/blob/release/www/transwarp/web.py Tornado
Tornado Web Server
Tornado Is an open source version of the scalable, non-blocking web server and tools that power FriendFeed . The FriendFeed application is written using a web framework that looks a bit like web. py Or Google's webapp , But with additional tools and optimizations to take advantage of the underlying non-blocking infrastructure.
One obvious advantage of using tornado is that some wheels are built on their own to learn things.
Official Website image Tornado Web Server
Another advantage is that facebook is open-source, coupled with its excellent code quality and outstanding efficiency, is currently very popular, and a large number of outstanding products have emerged, for example, quora , INK361 , Area 42. Yes And so on. I don't think new users should use anything as huge as Django. We suggest Flask and implement many things by themselves. After you have some knowledge of Django, you will feel very comfortable.
The larger the project, the less helpful the framework will be, and more customized. it is quite troublesome to modify Django. however, from the very beginning, you have almost customized the microframework. recommended uliweb:
Document: Uliweb-Doc
Mail List: http://groups.google.com/group/uliweb
QQ group: 162487035

There are some tutorials for beginners, and many beginners are discussing in the QQ group. In the mail list and QQ group, you can discuss the problem with the author. If you are learning, you can develop a framework by yourself.
Python simulates Django framework
Day 5-write a Web Framework
Bottle: Python Web Framework
Copy the image and modify it. Python is easy to create. It is easy to create a wheel. If there are too many ideas, you will not be afraid of any other framework. I learned python web development from django-> web. py-> tornado-> bottle-> flask. Now the team uses the flask-based secondary development framework.

At first, I learned about django because I searched for the python web development framework and talked about django on full screen.

Later, I thought it was too tmd heavy. Under the reverse psychology, I went to view web. py.

Web. py is actually quite good, but it is a pity that the author has never been maintained. I just heard that tornado has good performance, such as web. py, and it is not bad to learn. In fact, I always like the high performance of non-blocking IO.

Later I came into contact with gevent and learned that non-blocking IO has a more elegant implementation method. Tornado does not satisfy my strict demand for "conciseness", so I planted it into the bottle library, which is simply a library with only one file.

Later, my friend recommended flask because it is very similar to bottle, but it has better support for large project organizations, more plug-ins, and better ecosystem. Learn it with a try. Now, it's good to use bottle. It's short and cool. pyramid is used, and it's still relatively free. My recommendation is lightweight Flask, full-featured Django, and heavy-duty Pyramid.

For the purpose of learning, we recommend that you start with Django, learn about it, and then turn to Flask.

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.