Pyjs: apps for desktop and browser with Python

Pyjs (also known as Pyjamas) is a development platform for creating rich client-side applications that can in a web browser and as a standalone desktop application. Pyjs includes: a stand-alone Python-to-JavaScript compiler, an AJAX widget toolkit and a Widget Set API.

Pyjs PyjamasPyjs (also known as Pyjamas) is a development platform for creating rich client-side applications that can run in a web browser and as a standalone desktop app. Pyjs started as a port of Google Web Toolkit from Java to Python to enable the Rich Media AJAX applications development in Python without any special browser plugins.

What is Pyjs for?

Pyjs includes: a stand-alone Python-to-JavaScript compiler, an AJAX widget toolkit and a Widget Set API. Using these tools developers can write functional apps that can be executed in all major web browsers with no need for any JavaScript code. Firstly, application will benefit if it is written in Python, since high level concepts can be encapsulated in reusable and portable Python classes and modules. Python is readable programming language, while HTML and Javascript are mostly unreadable even for medium-sized apps. Secondly, with Pyjs developer will not have to focus on the browser incompatibility issues, because the AJAX library will deal with them on its own.

Among main useful Pyjs features are:

  • app development  in a pure object-oriented fashion;
  • dynamic and reusable UI components and pre-designed classes;
  • ability to mix handwritten JavaScript in the Python source code;
  • support of basic Python types (e.g List, Dictionary, Tuple, string), many of the standard Python built-in functions (e.g. map, filter, range), and some of the standard Python Exceptions;
  • simple RPC mechanism;
  • History module that provides browser history management;
  • Run-time Support for runtime errors.

What is Pyjs Desktop?

Pyjs Desktop is an application widget set for desktop and a cross-platform framework that allows original unmodified Python web application source code to run as a standalone desktop application and not to be limited by a web browser.

It is similar to other Python application development tools like wxWidgets, PyQT4 and PyGTK2, but more powerful one, since most web-engine technology - HTML, CSS, plugins and some other web-related features are supported out-of-the-box.

Python app can be executed directly, through the standard python interpreter on all major desktop platforms due to xulrunner as the browser engine (for rendering of app's widgets) and several available Desktop ports. Pyjs Desktop uses MSHTML for the Windows port, since it is already preinstalled on the Windows Operating System, as part of IE.

Pyjs and Pyjs Desktop are the tools that allow developing cross-platform, cross-browser, cross-desktop, and cross-widget applications entirely in Python and run them on the web and on the desktop.

Connect with our experts Let's talk