Python Web Development Libraries - py4Web Framework



py4web is an easy to use web development framework where we can have multiple apps under an umbrella of p4web framework and each app can be served by py4web server at same address and port. In py4web, we can have a python folder containing collection of apps/python modules. py4web requires python 3.7+ to function properly. py4web is an improved successor of Web2py Framework which is deprecated now.

Installation

It is always good to use a virtual environment to install a python library. We're following the same standard as shown below −

(myenv) D:\Projects\python\myenv>pip3 install py4web
Collecting py4web
  Downloading py4web-1.20260216.1-py3-none-any.whl.metadata (14 kB)
...
Successfully installed anyio-3.7.1 ombott-2.5 pluralize-20250901.2 portalocker-3.2.0 py4web-1.20260216.1 pydal-20260216.1 pyjwt-2.12.0 pywin32-311 renoir-1.8.0 rocket3-20241225.1 sniffio-1.3.1 threadsafevariable-20250716.1 watchgod-0.8.2 wheel-0.46.3 yatl-20230507.3

Setup apps

Once py4web is installed, run setup apps using following command −

(myenv) D:\Projects\python\myenv>py4web setup apps
Create missing folder D:\Projects\python\myenv\apps? [y/N]: y
Create app showcase? [y/N]: y
[X] Unzipping app py4web.app.showcase.zip
Create app _dashboard? [y/N]: y
[X] Unzipping app py4web.app._dashboard.zip
Create app _default? [y/N]: y
[X] Unzipping app py4web.app._default.zip
Create app _documentation? [y/N]: y
[X] Unzipping app py4web.app._documentation.zip
Create app _minimal? [y/N]: y
[X] Unzipping app py4web.app._minimal.zip
Create app _scaffold? [y/N]: y
[X] Unzipping app py4web.app._scaffold.zip
Pick a password for the dashboard:
Repeat for confirmation:
Storing the hashed password in file "password.txt"

Done!

Type "D:\Projects\python\myenv\Scripts\py4web run apps" "to start the py4web server.

Output

Run the Apps

Once py4web is installed, apply py4web run apps to start the server −

(myenv) D:\Projects\python\myenv>py4web run apps

██████◣◥█◣  ◢█◤ ██   ██ ██      ██ ███████ ██████◣
██   ██ ◥█◣◢█◤  ██   ██ ██      ██ ██      ██   ██
██████◤  ◥██◤   ███████ ██  ◢◣  ██ ██████  ██████
██        ██         ██ ◥█◣◢██◣◢█◤ ██      ██   ██
██        ██         ██  ◥██◤◥██◤  ███████ ██████◤

Py4web: 1.20260216.1 on Python 3.14.2 (tags/v3.14.2:df79316, Dec  5 2025, 17:18:21) [MSC v.1944 64 bit (AMD64)]


[ ] loading showcase ...
[X] loaded showcase
[X] loaded _dashboard
[X] loaded _default
[X] loaded _documentation
[X] loaded _minimal
[X] loaded _scaffold
Dashboard is at: http://127.0.0.1:8000/_dashboard
Ombott v2.5 server starting up (using <class 'py4web.server_adapters.adapter_rocket3.Rocket3Adapter'>
(reloader=False, logging_level=20))...
Listening on http://127.0.0.1:8000/
Hit Ctrl-C to quit.

Starting Rocket3 20241225.1 > MainThread > 13:01:46.422
watching (lazy-mode) python file changes in: D:\Projects\python\myenv\apps
Listening on sockets: 127.0.0.1:8000 > MainThread > 13:01:46.430

Open http://127.0.0.1:8000/ in your browser and verify the output −

py4web introduction
Advertisements