Python lives in the interface.
Package application modules and declared dependencies for a deterministic Pyodide runtime.
The full-stack Python application framework
Pytincture packages browser-safe Python for Pyodide, keeps privileged work on FastAPI, and generates an explicit bridge between the two. One language. Two deliberate runtimes.
1import json
2from dhxpyt.grid import GridConfig
3from py_ui_data import py_ui_data
4
5data = json.loads(py_ui_data().dataset())
6grid_config = GridConfig(
7 columns=columns, data=data
8)
9self.book_grid = self.tabbar.add_grid(
10 id="tab1", grid_config=grid_config
11)
More than a browser runtime
Pytincture handles the path from Python modules to a running browser application: packaging, startup, server calls, identity, assets, and production signals.
Package application modules and declared dependencies for a deterministic Pyodide runtime.
Serve routes, browser packages, public files, and trusted APIs from a configurable FastAPI/ASGI application.
Decorated server classes become class-shaped browser proxies with explicit methods, policies, and streaming support.
Local login, Google OAuth, explicit-tenant Microsoft OAuth, and SAML—with authorization enforced on the server.
Health, readiness, structured logs, correlation IDs, bounded work, and replica-safe signed sessions.
Exact pins or SHA-locked wheels, hashed manifests, filesystem containment, and a Pyodide software bill of materials.
One language, two runtimes
Browser code owns interaction. Server code owns credentials, policy, and trusted systems. Pytincture makes the handoff visible and removes the repetitive transport glue.
UI modules and declared dependencies become browser-ready assets for a named Pyodide lifecycle.
load → install → import → runClass-shaped proxies carry calls over explicit HTTP methods, with CSRF and replay protection where required. Policy stays server-owned.
@backend_for_frontendAuthentication and policy run before protected application code is imported, constructed, or called.
user → policy → systemsfrom reports import Reports
status = Reports().status()
self.badge.set_value(status["state"])@backend_for_frontend
class Reports:
def status(self):
return {"state": "ready"}Optional Python UI toolkit
dhxpyt wraps DHTMLX components for Python-first layout, configuration, and events inside Pytincture applications.
Form, combobox, datepicker, and message components composed from Python.
Check whether the application is ready to receive traffic.
PyReadiness is green./readyz reports the modules path, frontend runtime, and configured stores are available.
Licensing: Pytincture core is MIT licensed. dhxpyt is GPL-2.0; bundled DHTMLX assets may require GPL, evaluation, or commercial licensing.
One framework, two delivery modes
Start from the same browser-Python foundation, then keep the application static or add the trusted service boundary.
Run inline Python from static hosting with Pyodide and pinned browser dependencies.
Add trusted code, authenticated data, generated BFF calls, managed assets, and optional MCP exposure.
Built for operational use
Add only what the deployment needs. The core exposes defined contracts instead of leaving production behavior to convention.
Read the production guide ↗Start with a real application
Configure the service, define a browser entry point, and declare the UI package Pytincture should resolve.
python -m pip install pytincture==1.0.0rc2python -m uvicorn service:app --port 80701from pathlib import Path2from pytincture import PytinctureConfig, create_app34HERE = Path(__file__).resolve().parent56app = create_app(7 PytinctureConfig(8 modules_path=str(HERE),9 default_application="hello",10 )11)1import js2import widget3from dhxpyt.layout import MainWindow45class hello(MainWindow):6 def load_ui(self):7 js.document.getElementById("maindiv").innerHTML = (8 "<h1>Hello from Pytincture</h1>"9 "<p>Python is running in your browser.</p>"10 )1__widgetset__ = "dhxpyt"2__version__ = "0.9.16"Python is running in your browser.
The public contracts, qualification matrix, and production gates are in place. Final 1.0 remains in its required observation period and awaits release approval.
Technical documentation
Start with architecture, then follow the boundary into identity, deployment, lifecycle, and compatibility.
Build and run the maintained service example.
↗ BoundaryBFF guideExports, methods, policies, streams, and failure behavior.
↗ IdentityAuthenticationLocal login, OAuth providers, SAML, and session behavior.
↗ OperationsProduction deploymentReadiness, proxies, replicas, secrets, and observability.
↗Start in Python
Start with the framework, then bring in BFF access, authentication, and dhxpyt as the application grows.