Table of contents
1.
Introduction
2.
Libraries
2.1.
Web2py Libraries
3.
Frequently Asked Questions
3.1.
How to run web2py?
3.2.
What is the purpose of web2py?
3.3.
Is web2py a good framework?
3.4.
Is web2py an open-source project?
3.5.
What is the full form of DAL?
4.
Conclusion
Last Updated: Mar 27, 2024

Libraries in Web2py

Author Kanak Rana
1 upvote
Career growth poll
Do you think IIT Guwahati certified course can help you in your career?

Introduction

Web2py, written in Python and programmable in python, is a free, open-source web framework for  Agile development that involves database-driven web applications. It is a full-stack framework with every part a developer could need to create a fully functional web application.

web2py

In contrast to conventional patterns, the web2py framework runs web applications using the Model-View-Controller design.

  • The model is a component of the application that contains the data logic. Data from the database is retrieved and stored using the objects in the model.
     
  • The application's view component aids in providing users with the data display. Data is pulled from the model for the data display.
     
  • The controller manages user interaction and is a component of the application. Controllers can read information from views, control user input, and send information to a particular model.
     

Let's look into the libraries in web2py and know more about them.

Libraries

They are included in web2py and made available to all applications as objects. These objects are defined in the core files in the "gluon" directory.

libraries in web2py

Numerous modules, such as the DAL(Database Abstraction Layer) template, are independent and can be used without the web2py framework. Additionally, it keeps the unit tests running, which is regarded as best practice.

The user applications can access the web2py libraries as global objects. For instance, classes (helpers, validators, DAL API), requests, responses, sessions, and caches.

Web2py Libraries

The libraries present in the web2py.py file are:

libraries in web2py

Some more of the libraries in web2py are:

Libraries

Description

gluon/contrib/redis_cache.py It is a module to store cache in the Redis database.
gluon/contrib/gql.py gql, a port of the DAL to the Google App Engine.
gluon/contrib/memdb.py memdb, a port of the DAL on top of memcache.
gluon/contrib/gae_memcache.py gae_memcache is an API to use memcache on the Google App Engine.
gluon/contrib/populate.py A Bayesian classifier to populate the database with dummy data for testing purposes.
gluon/contrib/heroku.py A file with API for running on Heroku.com.
gluon/contrib/taskbar_widget.py A file that allows interaction with the taskbar in windows, when web2py is running as a service.

gluon/contrib/__init__.py

gluon/contrib/feedparser.py

feedparser for reading RSS and Atom feeds

gluon/contrib/markdown/__init__.py

gluon/contrib/markdown/markdown2.py

markdown for wiki markup.
gluon/contrib/fpdf fpdf created my Mariano Reingart for generating PDF documents.
gluon/contrib/pysimplesoap/ pysimplesoap is a lightweight SOAP server implementation.
gluon/contrib/simplejsonrpc.py simplejsonrpc is a lightweight JSON-RPC client also created.

gluon/contrib/memcache/__init__.py

gluon/contrib/memcache/memcache.py

memcache Python API 
gluon/contrib/google_wallet.py Google Wallet provides "pay now" buttons which link Google as payment processor.
gluon/contrib/stripe.py Stripe.com  provides a simple API for accepting credit card payments.
gluon/contrib/AuthorizeNet.py AuthorizeNet provides API to accept credit card payments via Authorize.net network
gluon/contrib/DowCommerce.py Dowcommerce credit card processing API.
gluon/contrib/paymentech.py PaymentTech credit card processing API.
gluon/contrib/populate.py A Bayesian classifier to populate the database with dummy data for testing purposes.


 These are the optional login_methods and login_forms to be used for authentication:

Login methods libraries

Note: Many of these modules of libraries in web2py, including DAL (the Database Abstraction Layer), template (the template language), rocket (the web server), and HTML (the helpers), have no dependencies and can be used outside of web2py.

Frequently Asked Questions

How to run web2py?

Web2py doesn't need to be installed. Start by running the corresponding web2py.py file after unzipping the downloaded zip file for your particular operating system.

What is the purpose of web2py?

Through Web2py, web developers are able to create dynamic web content using python. Web2py is intended to aid in the reduction of time-consuming web development tasks.

Is web2py a good framework?

It is a stable and reliable Python web framework with rock-solid APIs.

Is web2py an open-source project?

Web2py is a free, open-source web framework for developing secure database-driven web applications in an agile manner.

What is the full form of DAL?

The full form of DAL is the Database Abstraction layer. A database abstraction layer (DAL) is an application programming interface that allows a computer application to communicate with databases such as SQL Server, IBM Db2, MySQL, PostgreSQL, Oracle, or SQLite.

Conclusion

In this blog, we have learned about web2py, which framework it runs in, and the libraries in web2py. 

To know more in detail about libraries in web2py, you can take a look at the following official articles.

 
You can also check some other related articles on web2py:

Refer to our guided paths on Coding Ninjas Studio to learn more about DSA, Competitive Programming, JavaScript, System Design, etc. Enroll in our courses and refer to the mock test and problems available; look at the Top 150 Interview Puzzles interview experiences, and interview bundle for placement preparations.

Thankyou

Do upvote our blog to help other ninjas grow. 

Happy Learning Ninja!

Live masterclass