In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/02 Report--
This article mainly explains the "introduction of 5 practical python website development frameworks". The content of the explanation is simple and clear, and it is easy to learn and understand. Please follow the editor's train of thought to study and learn "5 practical python website development frameworks introduction".
Django
The one who ranks first is of course Django. In fact, it is because of the existence of Django that hundreds of website projects can be successful, and python can become the most commonly used language in website development. Large organizations and companies, including Instagram, Mozilla Firefox, National Geographic, Pinterest, NASA and so on, are using Django as the website development framework.
This is why for most web developers, Django is the single most frequently mentioned framework if python is used as the development language. Especially because of the following features and advantages, Django CMS is always the most basic and commonly used management system in website development:
1. There are many templates that can be used directly.
2. Operate the database
3. Object-oriented programming method
4. Network address mapping
5. Built-in website server
6. You can use the HTML form to get the data and pass it to the server (it is so easy to implement this function in Django that a rookie can easily use it)
7. Secure and reliable user rights
8. Intuitive management interface
9. Powerful XML/JSON processing function
As a result of these aspects mentioned above, Django is competent for a variety of large website projects. Are you attracted to this frame? If not, let's look at the next one.
CherryPy
CherryPy is a website development framework second only to Django, and its biggest feature is that it can run several web services at the same time. The biggest difference between Django and CherryPy is that the latter does not have as many templates as the former, but provides library files that can be imported. In fact, this approach gives developers a lot of freedom and expansibility, and programmers are free to choose to use or disable various templates, user rights, and databases.
In addition, CherryPy is actually a simple but not simple HTTP framework based on Python, allowing interaction with all types of servers (such as Apache, etc.). If you are new to website development, it is important to remember that it is best to form a set of tools that you can easily use in your project (we should be well aware that CherryPy has a flexible and powerful plug-in system).
TurboGears
TurboGears is a website development framework based on MVC architecture, which is based on some WSGI components (such as SQLAlchemy, Ming, Repoze, etc.), template engine (Genshi, Kajiki, Cheetah, Myghty) and a large number of library files and middleware (middleware). At the same time, it has a widgets control, which is very convenient to generate some specific functions.
The main features of TurboGears are: use FormEncode for form validation; use Gearbox as a project management tool, and provide network services (the new version also supports the use of Apache or Nginx as a server); many practical command line tools; support MochiKit module, a text content processing genshi template engine, including the creation of UI and Tosca Widgets library files. The convenience that these common functions bring to programmers can not be replaced by other frameworks. One more thing-many programmers using TurboGears will recommend its compact mode, that is, TurboGears can be configured as the lightest framework.
Flask
Flask is a quite new framework. After a thorough study of the existing frameworks, their advantages and disadvantages are analyzed, and on this basis, a web framework is developed, which takes all the essence and removes all the dregs.
Flask is a lightweight framework that is easy to learn and has been widely used in small projects with only one or two functions. Projects like httpbin are simple but very powerful. Similar to CherryPy, it supports all DBMS and template engines. The advantage of Flask is that it has many extension tools to create website-based applications (beginners should be encouraged to use these tools), its code is also simple and clear (it takes only three lines of code to build a home page showing "Hello World"), implements modular management through blueprint, and supports Django's official template language, Jinja2. The ability to create API-based solutions and disposable tools (which can be time-consuming and laborious to implement with other frameworks).
Pyramid
The last framework we mentioned is Pyramid, which evolved from part of the Pylons project. The biggest features of Pyramid are flexibility and extensibility (especially compared with Django). When using Pyramid, programmers are free to choose which database, URL structure, template style, and so on, as the developers of the framework say:
"those heavyweight frameworks are making decisions for users. But if these don't work for you, there's nothing you can do about it; lightweight frameworks don't make decisions for you, and you can get started quickly. But as your site gets bigger and bigger, you'll find that small frameworks limit your big projects. In both cases, you only focus on the beginning of the project: either too big or too small, in other words, you can't really predict how big and complex the project will be at the beginning of the project. You need a framework that focuses on post-development of the site, so that it meets your needs well, no matter whether your project is big or small. Pyramid is such a framework, big or small, just right. "
With Pyramid, you can easily create traditional RDBMS applications using SQLAI. Like Flask, Pyramid supports many types of templating languages and engines, including Jinja2 and Mako, and it has its own built-in solutions. It is even compatible with Chameleon--, a convenient and general-purpose ZPT template tool.
Pyramid's widely recognized advantages include: the ability to generate a single file for a complete website; modifiable templates; configurable resources; flexible authentication and authorization; advanced boot tools-pcreate; 's view-based approach; support for imperative and declarative configuration syntax; HTTP caching; built-in Session sessions, and so on. Generally speaking, Pyramid is the most popular framework for building large, small and medium-sized applications. On the other hand, it is precisely because of such strong flexibility that some beginners with choice difficulties may struggle with which functions to use, and if they do not choose well, they may fall into one pit after another.
Thank you for your reading, the above is the content of "5 practical python website development frameworks". After the study of this article, I believe you have a deeper understanding of the introduction of 5 practical python website development frameworks, and the specific use needs to be verified in practice. Here is, the editor will push for you more related knowledge points of the article, welcome to follow!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.