Pythonic web development

Python web framework JustPy – interactive websites without JavaScript

Maika Möbus
© Shutterstock / Wallpaper photographer

JustPy is a new Python web framework that requires no front-end programming and is meant to be an alternative to JavaScript for creating interactive websites. The project is still in its early stages of development, yet offers an extensive documentation and tutorials, and comes with support for pandas, Matplotlib and more.

The very first public release of the high-level Python web framework JustPy has been published to GitHub. JustPy is object-oriented, component-based, and does not distinguish between front-end and back-end programming.

As the framework’s developer Eliezer Mintz describes, “All programming is done on the back-end allowing a simpler, more productive, and more Pythonic web development experience.” He further hopes that “JustPy will enable teaching web development in introductory Python courses by reducing the complexity of web development.”

SEE ALSO: CodinGame 2020 developer survey says Python is the most loved programming language

So, let’s see how to use JustPy and how it integrates with other Python tools.

First steps with JustPy

JustPy requires Python 3.6 or higher, and it is recommended to run the tutorial programs in a virtual environment so as not to affect the system-wide Python interpreter.

The documentation shows how to install JustPy and its dependencies, after creating a directory and creating and activating the virtual environment jp:

$ mkdir jptutorial
$ cd jptutorial
$ python3 -m venv jp
$ source jp/bin/activate
(jp) $ pip install justpy

On Windows, use jp\Scripts\activate instead of source jp/bin/activate to active the virtual environment.

Then, in the jptutorial directory, you can create the file (another file name may be chosen instead) that contains the following code:

import justpy as jp

def hello_world():
    wp = jp.WebPage()
    return wp


Now, run the program by entering the command $ python3 and go to or http://localhost:8000/ in your browser – and you should see “Hello!”. When you click on it multiple times, the number of clicks should be displayed.

Support for Matplotlib, pandas and more

In JustPy, visualizations with the Python library Matplotlib and the JavaScript charting library Highcharts are supported. Additionally, JustPy has a pandas extension on board for creating interactive charts and grids.

SEE ALSO: New ML tool HiPlot offers interactive high-dimensional data visualization

For more details, see the official website, the GitHub repo, or follow JustPy on Twitter.

Maika Möbus
Maika Möbus has been an editor for Software & Support Media since January 2019. She studied Sociology at Goethe University Frankfurt and Johannes Gutenberg University Mainz.

Inline Feedbacks
View all comments