Other langages : French Español …

About web.py

web.py is a web framework for Python that is as simple as it is powerful. web.py is in the public domain, you can use it for whatever purpose with absolutely no restrictions.

Install web.py

To install the latest web.py for Python 3, please run:

pip3 install web.py

The latest 0.61 release supports Python >= 3.5. Version 0.51 is the last release with Python 2.7 support.

A minimal web.py application

Save code below in file app.py :

import web urls = ( '/(.*)', 'hello' ) app = web.application(urls, globals()) class hello: def GET(self, name): if not name: name = 'World' return 'Hello, ' + name + '!' if __name__ == "__main__": app.run()

Start the application with command below, it listens on http://0.0.0.0:8080/ by default.

python3 app.py

Who uses web.py?

web.py was originally published while Aaron Swartz worked at reddit.com, where the site used it as it grew to become one of the top 1000 sites according to Alexa and served millions of daily page views. “It’s the anti-framework framework. web.py doesn’t get in your way,” explained founder Steve Huffman. (The site was rewritten using other tools after being acquired by Condé Nast.)

Some user testimonials: