User:Ramil811/Web.py

Web.py is an open-source python-based web application framework created by Aaron Swartz. It is designed to build a simple yet powerful web application. It allows the developers to create a web application from scratch giving them full control of all aspects of web development. The main idea behind this was “Think of the ideal way to write a web app. Write the code to make it happen.”

Web.py helped Reddit.com to become a top website while Aaron developed Web.py. It can be used by anyone, for any purpose as the framework is available in the public domain.

History
Aaron Swartz started working on Web.py in 2008. Aaron wanted a faster and simpler framework for python web applications. In 2008, while Aaron was working at Reddit.com, he used Web.py to build Reddit.com which helped Reddit become a top website with millions of daily views. Later Reddit was rewritten using other modern-day web application frameworks.

Development Releases
Web.py’s first official release was on 10th December 2008 known as “webpy-0.31”. Web.py has released 11 more versions of the framework over time. Web.py has seen continuous development before Aaron Swartz’s death. Web.py released its next major update in 2016, 3 years later Aaron’s death. After which, Web.py has released two more updates in 2018 and 2019 (latest release). Web.py is now being maintained and improved by the contributors of the GitHub Project.

Latest Release
Web.py’s latest version, 0.40 released on 27th September 2019. The new version supports Python 2, but the maintainers will drop support for the Python version in their next release. The latest version adds functionality to connect to SQLite Databases through URLs and now supports SameSite cookies which helps in preventing CSRF attacks and making secure applications using the framework. The latest version also fixes major bugs including connecting to PostgresDB, IP Address Validation, DiskStore concurrency and many Python-3 compatibility issues.

Features
Web.py is lightweight and a fast web framework for python-based web apps. It was built around the idea of a minimalist framework. Web.py’s slogan says, “Think about the ideal way to write a web app. Write the code to make it happen.”

Web.py has a built-in webserver accompanied by a debug feature which is automatically enabled when the application is in development mode. Developers use Web.py’s webserver and debugger together as it automatically refreshes the page after a change takes place in the code which helps them in quick and efficient debugging.

A Web.py web application can be deployed to any server supporting WSGI (Web Server Gateway Interface). WSGI connects the server-side applications such as Apache / Nginx to the web application side built using Python. WSGI helps the server to communicate to the application and return responses in HTML which is then shown to the client (user).

In the latest release, Web.py has added SameSite cookies which prevent CSRF attacks making the web application build using this framework secure for its users. It also has the functionality to allow concurrent data storage allowing the applications built on it to store data without any data corruptions or data losses.

Installation
Web.py has a simple installation process. To install Web.py on a system with Python installed, you need to download the latest .zip from its GitHub project page, extract and a run an install script to install the framework with all its features including the inbuilt webserver and the debugger.

To start writing a web application using web.py the first line should be import web. This imports web.py’s functions and packages like database and forms.

A Simple Hello World program can be written using the code sample below.

Additional Packages
Web.py is a minimalist framework which means everything needs to be built from scratch. A web application needs to communicate with its database and store information collected from forms in the application. This requires developers to build the database and forms from scratch. Web.py has some additional packages which can be used to create databases and forms with validation in Web.py.

Database Package
A Database Package comes with Web.py which is same as sqlite3 python package which is used to create and connect to databases in python. To use the database package in the application you don’t have to import any other package. This package can be directly used from the same import web statement. A code example below shows a database connection in web.py.

Forms Package
The forms package of the framework allows the developer to create forms with validation and securely send the data to the backend side of the application. Using the package, the developers can refrain from creating forms in HTML with poor security and ask the package to create the form. Developers need to tell the package what type of fields they require, and the validation required for that field. A code example below shows how a form is created in web.py.

Licenses
The latest version of Web.py (0.40) is released with a public domain license. It is an open-source web framework, and anyone can contribute to this framework.

Being available in the public domain allows Web.py to be used by anyone and for any purpose without any restrictions.

Use of Web.py
Reddit.com was one of the first companies to use Web.py as its framework in 2005. Using Web.py, Reddit.com got access to a wider range of code libraries and it significantly increased their development flexibility. A year later in 2006, Conde Nast Publications acquired Reddit.com and the web application was rewritten using other tools.

Web.py is still used by many companies around the globe


 * Yandex
 * Oyester.com
 * local.ch
 * Make History
 * Chiefmall
 * archivd.com