Skip to main content

PySide6DOM

Bring the simplicity of the Web DOM to Python PySide6 Desktop Applications.

Installation

pip install pyside6dom

PySide6DOM bridges the gap between web development and systems programming. It wraps the raw power of the PySide6 (C++/Qt) rendering engine inside the familiar, intuitive Document Object Model (DOM) paradigm used by JavaScript and HTML.

If you know how to build a web page using createElement, getElementById, and appendChild, you already know how to build high-performance, standalone Python desktop applications.

🌟 Why Use PySide6DOM?

  • Zero HTML Parsing: This is not a web view or a browser wrapper. It generates native C++/Qt desktop widgets using Python, ensuring maximum performance.
  • Familiar Syntax: Uses lightweight helper functions modeled directly after the web DOM (ce() for create element, ge() for get element, ba() for body append).
  • Rapid Prototyping: Build user interfaces in seconds without getting bogged down in complex object-oriented boilerplate.
  • Educational Bridge: The perfect stepping stone for web developers transitioning into local hardware control, computer vision, and systems engineering.

📂 Repository Structure

This repository includes two learning paths:

  • 001_pyside6dom/ (Modular / Production Ready): Separates the heavy GUI engine into a background module (pyside6dom_modular.py) so your main application script remains incredibly clean.
  • 002_pyside6dom_single_file/ (Training Wheels): Contains everything in a single script, allowing you to see exactly how the DOM wrappers interact with the raw PySide6 classes under the hood.

🚀 The Code: Web Logic meets Python Power

Look how clean and intuitive building a native desktop app becomes. No complex classes, no confusing layout managers - just straightforward DOM logic.

from pyside6dom import ce, ge, ba, init_window, run_app

# Initialize the Application
init_window("Telemetry Station", width=440, height=520)

# Create a Header (createElement)
header = ce("text")
header.id = "main_heading"
header.textContent = "Telemetry Link Online"
header.style("font-size: 18px; font-weight: bold; margin-bottom: 10px;")
ba(header) # (appendChild)

# Create an Input Field
command_input = ce("input")
command_input.id = "user_input"
command_input.placeholder = "Enter station parameter..."
ba(command_input)

# Create an Interactive Button
submit_btn = ce("button")
submit_btn.textContent = "Transmit Command"

# Define what happens on click
def handle_click():
    txt = ge("user_input").value
    print(f"Transmitting Data: {txt}")

submit_btn.onclick = handle_click
ba(submit_btn)

# Launch the App
run_app()

🛠️ Core API Reference

Function Web Equivalent Description
ce(tag) document.createElement() Creates a new native widget. Supports: "button", "text", "input", "slider", "div", "scroll_div".
ge(id) document.getElementById() Retrieves a previously created element by its unique .id property.
ba(element) document.body.appendChild() Appends the element to the main application window (or a specific parent container).

Created by Christopher Andrew Topalian

College of Scripting Music & Science

Disclaimer: This is an independent open-source educational project. "PySide" and "Qt" are registered trademarks of The Qt Company. This project is not affiliated with, endorsed by, or sponsored by The Qt Company.


How to Download this GitHub Repository

  1. Click the green Code Button on this github page
  2. Choose Download ZIP
  3. Save the Zip File
  4. Extract All

Hapy Scripting :-)


//----//

// Dedicated to God the Father

// Copyright (c) 2026-present Christopher Andrew Topalian

// Apache License Version 2.0, January 2004 http://www.apache.org/licenses/

// https://github.com/ChristopherTopalian
// https://github.com/ChristopherAndrewTopalian

// https://sites.google.com/view/CollegeOfScripting

Release files for pyside6dom 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pyside6dom 0.1.0
File Size Uploaded
pyside6dom-0.1.0.tar.gz 8.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for pyside6dom 0.1.0
File Interpreter ABI Platform
pyside6dom-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 18.1 kB

Release files / pyside6dom-0.1.0.tar.gz

Download URL pyside6dom-0.1.0.tar.gz
Size 8.8 kB
Tags Source
SHA-256 checksum
How to use checksums
373409abce4b308b2873276cba75d439617893b7bbd44d99a76ebe75785c728f
BLAKE2b-256 checksum
How to use checksums
3c61d8a659e7b9824563c58bcc69d0d005bb7823eb8a31a9bee66489f1583e97
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.0

Release files / pyside6dom-0.1.0-py3-none-any.whl

Download URL pyside6dom-0.1.0-py3-none-any.whl
Size 9.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
6510d7666d5abe5981b425a4eaee0e4558a35c1419b3b39387a3a9f97711ad3a
BLAKE2b-256 checksum
How to use checksums
d4fb56bed18a0223c66aa736354bf4fa22c0a7fb317ac57c095fa4da46876ad6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.0

Release history Release notifications | RSS feed

0.4.8

2 release files

0.4.7

2 release files

0.4.6

2 release files

0.4.5

2 release files

0.4.4

2 release files

0.4.3

2 release files

0.4.2

2 release files

0.4.1

2 release files

0.4.0

2 release files

0.3.9

2 release files

0.3.8

2 release files

0.3.7

2 release files

0.3.6

2 release files

0.3.5

2 release files

0.3.4

2 release files

0.3.3

2 release files

0.3.2

2 release files

0.3.1

2 release files

0.3.0

2 release files

0.2.9

2 release files

0.2.8

2 release files

0.2.7

2 release files

0.2.6

2 release files

0.2.5

2 release files

0.2.4

2 release files

0.2.3

2 release files

0.2.2

2 release files

0.2.1

2 release files

0.2.0

2 release files

0.1.9

2 release files

0.1.8

2 release files

0.1.7

2 release files

0.1.6

2 release files

0.1.5

2 release files

0.1.4

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

This release

0.1.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page