Skip to main content

Introduction

What is Pglet​

Pglet is a rich user interface (UI) framework for scripts and programs written in any language and a service for securely sharing your application UI. Python, Bash, PowerShell and Node.js are already supported and other languages can be easily added via Pglet protocol.

Pglet renders web UI, so you can easily build web apps with your favorite language. Knowledge of HTML/CSS/JavaScript is not required as you build UI with controls. Pglet controls are built with Fluent UI React to ensure your programs look cool and professional.

Hello, world!​

Install pglet module:

pip install pglet

Create hello.py with the following contents:

hello.py
import pglet
from pglet import Text

p = pglet.page()
p.add(Text("Hello, world!"))

Run hello.py with Python 3 and in a new browser window you'll get:

Here is a local page served by an instance of Pglet server started in the background on your computer.

Now let's bring that page to a web, so others can see it!

Add web=True to pglet.page call:

p = pglet.page(web=True)
p.add(Text("Hello, world!"))

This time the page will be created on Pglet hosted service.

Tutorials​

Want to learn how to build the real app? Jump to a tutorial for your language: