A Python framework for data tools and AI applications: one prebuilt React bundle, driven from Python.
pip install millwork==0.2.3 Copy PIP instructions
A page is a Python function of the session's state. A handler changes the state, the page renders again, and the browser receives a patch. The React bundle ships inside the package, so a project is Python only.
import millwork as mw from millwork import ui from pydantic import BaseModel class State(BaseModel): clicks: int = 0 app = mw.App("hello", state=State) @app.page("/") def home(s: mw.Session[State]) -> ui.Component: return ui.Page( ui.Text(f"Clicked {s.state.clicks} times."), ui.Button("Add one", on_click=lambda s, _: setattr(s.state, "clicks", s.state.clicks + 1)), ) Installation uv add millwork # or `pip install millwork` uv run millwork run app.py What is included A catalog of components on shadcn/ui: layout, text, inputs, feedback, tables, charts, forms from Pydantic models, files, tasks with progress, and a chat surface that streams replies from Python. One model of state. Python owns the state; a control is owned by Python or by the browser, and the page says which. Long work as tasks, with progress, steps and cancellation drawn by the page, and chat replies that stream text, reasoning and tool steps. Files over the session's socket. Uploads, downloads and inline images travel on the same connection as everything else, so replicas need no sticky routing and no shared storage. Sign-in with password, OAuth and proxy-header providers behind one on_login hook, and a theme file in the shadcn token vocabulary for colors, fonts and logos. A test harness that drives a page without a browser: open it, click, change, submit, and read what the tab would have received. One process to run. millwork run serves an app on a port or a unix socket, behind a proxy and under a path prefix, with a health route for the host. The manual The manual is at millwork-ui.com.
The manual itself is a millwork app. Every example in it runs, with the Python code beside it. The chapters cover pages and routing, state and handlers, signing in, theming, testing and running, and every component has a live example. It also runs locally:
uv run millwork docs Then open http://127.0.0.1:8008.
millwork reference prints the catalog as one Markdown table of every component, its props with their types and defaults, the session's and the app's calls, the icon names, the form widgets and the formats. The hosted manual serves the same text at millwork-ui.com/llms.txt, for a model that needs easy lookup.
Bug reports and fixes are welcome. CONTRIBUTING.md has the setup, the checks a change has to pass, and how to propose a larger one.
1 file in this release has provenance metadata.
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 8, 2026.
1 file in this release has been uploaded with provenance metadata.
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.




