JustPaste.it

Web2py Framework

In the Ruby programming world, Ruby on Rails is in fact the most widely used framework. Massimo Di Pierro, Professor of Computer Science at DePaul University, was inspired by 'Rails' to create a Python web framework that was equally easy to configure and use. The result is Web2py . 

The biggest attraction of Web2py is its integrated development environment. When configuring a Web2py instance, you are provided with a web interface, essentially an online Python application editor, where you can configure the application components. This usually means creating templates, views and controllers, each described using Python modules or HTML templates. Some sample applications come with Web2py ready to use. You can separate them to see how they work or take advantage of them as initial templates to create your own applications. 

Information Technology Technicians assist employees of organizations by helping them install and configure system software and hardware. They offer system and operations support to the personnel on a daily basis.

Developers typically deploy Web2py by downloading their source code and building on it. But for less technical users on Windows or MacOS, the creators of Web2py offer versions that are essentially standalone servers. Download, unzip and run one of these versions, and you will have a local web server with a pre-configured copy of Web2py integrated. This is a good way to create a Web2py application, which can then be deployed elsewhere as needed. 

The Web2py web interface was built with Bootstrap 4, so it's easy on the eyes and easy to navigate. The browser editor is not a replacement for a full IDE, but it is equipped with useful aids such as line numbering and Python syntax highlighting (including automatic indentation). Also included is a quick web interface for the Python shell, so you can interact with Web2py from the command line - a nice concession for experts. 

The data abstraction system used in Web2py works a little differently from Django's ORM and other ORMs inspired by it (like Peewee). These systems use Python classes to define models, while Web2py uses constructor functions like define_table
to instantiate models. The differences are likely to be shocking
only if you are used to the other way; they must not
intimidate newcomers. You will probably have no
problem linking Web2py to a data provider, as it
communicates with almost all the main existing databases. 

A truly useful database-related function in Web2py is the ability to generate a diagram of the models, allowing you to see how your models relate to each other. However, you will need to install the PyGraphviz library to enable this feature. 

Web2py embodies many other professional-level components: internationalization functions, various cache methods, access control and authorization, and even front-end effects (for example, a date picker on forms) through integrated support for jQuery and AJAX.

Hooks for external and internal middleware are also included, although you are not allowed to use middleware to replace Web2py's core functions. However, there is still no explicit use of Python's asynchronous functionality in Web2py, although there is a scheduler to handle long-running tasks. 

It is no wonder that the Web2py documentation is referred to as “the book”. First, it covers an impressive amount of material in Web2py, Python and the deployment environments used for both. Second, it is written in a highly accessible narrative style. Third, he talks in detail about common application building scenarios. There is an entire chapter, for example, on how to use jQuery to build AJAX applications .