web.py quickly implements simple Python web apps

Subscribe to our

Web.py Python frameworkWeb.py is a minimalist's framework that aims at implementation of simple Python web applications. Those developers who believe that new websites must be built from scratch will be fascinated by this fast and light-weight framework. Web.py keeps development process simple and efficient without either wizards, or boilerplate websites.

The web.py slogan is: "Think about the ideal way to write a web app. Write the code to make it happen." Web.py makes the process of web development as open-minded as possible and doesn’t get in the way of developers’ ideas. The reason to simplify the development process is that there are cases when there is no need to use MVC or create a mess of HTML, CSS, JavaScript, and PHP in one file. This solid web framework allows to write clean code and smoothly cooperates with other libraries.

Where web.py is used? Reddit ran on it for years, although now the site is rewritten using other tools. Among the most frequently visited web.py websites are:

  • Yandex (the leading Russian search engine),
  • Oyster.com (a website that reviews and photographs hotels),
  • local.ch (the official online Telephone Directory for Switzerland - uses web.py in a backend service for tracking expired content),
  • Make History (a project of the 9/11 Memorial Museum, is powered by web.py on top of Google App Engine),
  • Chiefmall (a contractor search tool),
  • archivd.com (a web application for collaborative research and archiving).

Web.py installation is very simple. It is enough to unzip an archive and execute a setup script. Web.py has no dependencies on other packages or libraries. Web.py does not aim to expose Python objects, but allows to build HTTP responses instead. Its template system tries to bring Python into HTML. Web.py includes a database package, a template engine, simple webserver, and abstractions for HTTP requests. Also web.py has a forms package that enables creation of forms and validators.

Library’s db package is similar to sqlite3 Python package, but allows to connect and use multiple different databases. Web.py provides a class for abstracting access to the database, but does not make the database look like an object, just makes it simple to work with. Web.py supports most of the well-known RDBMS systems, including PostgreSQL, MySQL, SQLite, Oracle, and Microsoft SQL Server. Since web.py is very flexible due to modules usage, to make the work with databases even easier and access all its functionality additional modules like pysqlite2, psycopg2, or MySQLdb can be installed.

Though web.py includes its own built-in webserver, it can be used for development work only. It provides useful debug features, automatically reloads after code changes and offers full error tracing information. Web.py implements WSGI and its applications can be deployed to any Web server that supports it.

To learn more about functionality of this Python library visit its official website webpy.org.