Skip to main content

DHX PyTincture Widgetset

Overview

The DHX PyTincture Widgetset is a Python-based library that integrates the DHTMLX JavaScript UI components with the pyTincture framework. Leveraging Pyodide, this widgetset enables developers to create rich, interactive web-based user interfaces using Python. It simplifies the process of building cross-platform GUI applications by combining DHTMLX's powerful UI components with pyTincture's seamless Pyodide integration.

Features

  • DHTMLX Integration: Utilize DHTMLX's extensive suite of UI components (e.g., grids, charts, forms, and schedulers) within Python applications.
  • Pyodide-Powered: Run Python code in the browser with Pyodide, enabling dynamic frontend development without leaving the Python ecosystem.
  • Cross-Platform: Build applications that work across various platforms where Pyodide is supported.
  • Customizable Widgets: Easily create and manage reusable UI components tailored to your application's needs.
  • Event-Driven: Support for event handling to create responsive and interactive user experiences.
  • AI Chat Widget: Stream Markdown-rendered assistant responses, surface artifacts in a live preview pane, and react to dark/light theme changes without leaving Python.

Browser content safety

Widget data is text by default. htmlEnable=True, CardPanel contentHtml / iconHtml, and HTML-returning CardPanel templates are explicit rich-content paths; their output is sanitized to a small formatting allowlist before it reaches the DOM. Grid, Listbox, and Combobox htmlEnable now default to False. Applications that previously relied on event attributes, scripts, inline styles, SVG, images, or other active markup inside those values must replace that markup with trusted application code and DOM event handlers.

Chat assistant Markdown never accepts raw HTML. HTML artifacts run only inside an opaque-origin sandbox with network, forms, popups, workers, and parent DOM access blocked. SVG artifacts are passive images, and Python artifacts are displayed as code rather than executed. This may change applications that previously depended on active SVG, in-page network calls, same-origin access, or automatic execution of model-supplied Python.

Chat histories are bounded to 100 messages per chat and 20 chats by default. Content persistence is off unless an existing explicit storage_key is used or persistence="local" / "session" is selected. Persisted history omits tool payloads, metadata, artifacts, and preview-console output and is capped at 2 MiB by default. Set persistence=False to remove earlier history under an explicit storage key. Artifact preview logs are source/capability bound and bounded, and they are excluded from send/model event payloads unless include_artifact_console_in_send=True is deliberately configured; included logs are marked untrusted.

Installation

Prerequisites

  • Python 3.13+

API Documenataion

https://pytincture.com/dhxpyt.html

Steps

  1. Clone the Repository:
    git clone https://github.com/pytincture/dhx_pytincture_widgetset.git
    cd dhx_pytincture_widgetset
    

Install Dependencies: Install the required Python packages and Pyodide dependencies: bash

pip install -r requirements.txt

or from pypi

pip install dhxpyt

QuickStart

Windows

Install UV / pytincture / dhxpyt on Powershell

powershell -c "irm https://astral.sh/uv/install.ps1 | iex"
$env:Path += ";$env:USERPROFILE\.cargo\bin"
[Environment]::SetEnvironmentVariable("Path", $env:Path, [System.EnvironmentVariableTarget]::User)
$env:Path = [System.Environment]::GetEnvironmentVariable("Path", [System.EnvironmentVariableTarget]::User)
New-Item -ItemType Directory -Name dhxpyt_quickstart; Set-Location dhxpyt_quickstart
uv venv --python 3.13; .\.venv\Scripts\Activate.ps1
uv pip install dhxpyt pyodide-py js pytincture itsdangerous
Invoke-WebRequest -Uri https://pytincture.com/quickstart.py -OutFile quickstart.py
$env:PYTHONUTF8 = "1"
uv run quickstart.py

Linux / MacOS

Install UV / pytincture / dhxpyt on Bash

curl -LsSf https://astral.sh/uv/install.sh | sh
echo 'export PATH="$HOME/.cargo/bin:$PATH"' >> ~/.bashrc
source ~/.bashrc
uv --version
mkdir dhxpyt_quickstart;cd dhxpyt_quickstart
uv venv --python 3.13 && source .venv/bin/activate
uv pip install dhxpyt pyodide-py js pytincture itsdangerous
curl -O https://pytincture.com/quickstart.py
uv run quickstart.py

Open in Browser: http://localhost:8070/quickstart

Metadata

Release files for dhxpyt 0.9.18

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

Source distribution (sdist)

Source distribution for dhxpyt 0.9.18
File Size Uploaded
dhxpyt-0.9.18.tar.gz 5.9 MB Details

Built distribution (wheel)

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

Total release size: 11.9 MB

Release files / dhxpyt-0.9.18.tar.gz

Download URL dhxpyt-0.9.18.tar.gz
Size 5.9 MB
Tags Source
SHA-256 checksum
How to use checksums
227e6671635e13cde72229d88d927bdc232b0413bb79a363102ffcfcdac60c34
BLAKE2b-256 checksum
How to use checksums
fc52f148ac3bb18e6050e17bc2938e8622419d9f7382d8c026564b196737471b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.11.16

Release files / dhxpyt-0.9.18-py3-none-any.whl

Download URL dhxpyt-0.9.18-py3-none-any.whl
Size 6.0 MB
Tags Python 3
SHA-256 checksum
How to use checksums
acd8db34547c6b61c83a01958e9545ee724564859e5bcb53713ae3c872234fbe
BLAKE2b-256 checksum
How to use checksums
0ce7b48e045156c7b4bf20778597991d7dfe591fd46ada5267b747e2d5977244
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.11.16

Release history Release notifications | RSS feed

This release

0.9.18 This release

2 release files

0.9.16

2 release files

0.9.15

2 release files

0.9.12

2 release files

0.9.11

2 release files

0.9.9

2 release files

0.9.7

2 release files

0.9.6

2 release files

0.9.5

2 release files

0.9.4

2 release files

0.9.3

2 release files

0.9.2

2 release files

0.9.1

2 release files

0.9.0

2 release files

0.8.9

2 release files

0.8.8

2 release files

0.8.7

2 release files

0.8.6

2 release files

0.8.5

2 release files

0.8.4

2 release files

0.8.3

2 release files

0.8.2

2 release files

0.8.1

2 release files

0.8.0

2 release files

0.7.9

2 release files

0.7.8

2 release files

0.7.7

2 release files

0.7.6

2 release files

0.7.5

2 release files

0.7.4

2 release files

0.7.3

2 release files

0.7.2

2 release files

0.7.1

2 release files

0.7.0

2 release files

0.6.9

2 release files

0.6.8

2 release files

0.6.7

2 release files

0.6.6

2 release files

0.6.5

2 release files

0.6.4

2 release files

0.6.3

2 release files

0.6.2

2 release files

0.6.1

2 release files

0.6.0

2 release files

0.5.1

2 release files

0.5.0

2 release files

0.4.9

2 release files

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

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