Introduction
Web2py is a Python-based, accessible, and open-source web framework enabling agile development of database-driven online applications. It is a full-stack framework that includes all the elements a developer needs to create a fully functional web application.

In this blog, we will discuss Third Party Modules, Execution Environment, Cooperation, and Logging in Web2py.
Third Party Modules
Because web2py is developed in Python, it can import and utilize any Python module, including third-party modules. All it needs to do is be capable of finding them. Modules may be installed in the official Python site-packages directory and then imported from anywhere in your code, just like with any other Python program.
There are mainly two ways of including the third-party modules in Web2py:-
1.) Using the site-packages directory.
2.) Using the module folder of Application.
Using the site-packages Directory
The site-packages directory contains modules that are, as the name implies, site-level packages. Applications that need site-packages are not portable unless these modules are installed separately.
Let’s take an example to understand how to include third-party modules using the site-packages directory.
Consider the "pandas" package as an example. You can use the pip command to install it from the command line.
pip install pandas
and then you can import it into any model/controller/view with:
import pandas
A site-packages folder may be found in the top-level folder of both the web2py source distribution and the Windows binary distribution. The Mac binary release includes a site-packages folder:
web2py.app/Contents/Resources/site packages
Let’s look at the advantage and disadvantages of using the site-package directory.

Using the Module Folder of Application
Web2py provides another method for importing modules without changing the global sys.path: by storing them in an application's "modules" subdirectory. One advantage is that the module will be automatically duplicated and distributed with the application.
For example, Once a module "mymodule.py" is placed in an app "modules/" folder, it may be imported from anywhere inside a web2py application (without the need to change sys.path with):
import mymodule