Skip to main content

banner

ci docs python license pypi docs site

python-first web applications with a genuine shadcn/ui renderer.

shadlet is a framework that lets developers build modern web applications in python. react renders the interface with authentic shadcn/ui components. python manages application state, events, routing and server-side logic. end users run applications with python only; node.js is only needed to build the renderer.

showcase

demo1

why shadlet

  • python developers can build web applications using pure python.
  • the frontend is genuine shadcn/ui (tailwind + base-ui), not an imitation.
  • components are strictly typed and validated across the protocol.
  • reactive session state, async event handlers, and incremental patches.

comparison

feature shadlet typical python web ui
rendering react + authentic shadcn/ui server-rendered templates
state reactive session state request/response state
components 56 built-in shadcn/ui components custom widget sets
packaging python wheel with bundled renderer manual frontend build

features

  • typed python component api with enums and validation
  • 56 built-in components from shadcn/ui base-vega
  • official bundled geist variable & geist mono typography
  • smooth animations, backdrop blur, and spring physics
  • automatic port switching when default port is occupied
  • hot reload with diff-based patches
  • session-scoped reactive state
  • async event handlers with cancellation
  • versioned json protocol with incremental patches and shared pydantic/zod fixtures
  • validated websocket handshake, token-based session restoration, and origin checks
  • configurable connection authentication, event rate limits, and message size limits
  • typer and rich cli
  • github project templates
  • mkdocs documentation website

installation

requirements:

  • python 3.11 or newer

node.js is only required for maintainers building the renderer from source.

pip install shadlet

for development from source:

uv pip install -e '.[dev]'

verify:

shadlet doctor
shadlet info

quick start

create a project:

shadlet create my-app
cd my-app
shadlet dev

or write main.py directly:

import shadlet as ui

app = ui.App("counter")


@app.page("/")
def home(ctx: ui.Context):
    count = ctx.state(0, key="count")

    def increment(event: ui.ClickEvent):
        count.value += 1

    return ui.Center(
        ui.Column(
            ui.Heading("counter"),
            ui.Text(count),
            ui.Button("increment", on_click=increment),
            gap=16,
        ),
        min_height="100vh",
    )


if __name__ == "__main__":
    app.run()

run:

python main.py

open http://127.0.0.1:8000.

demo2

architecture

flowchart LR
  A[python application] --> B[component api]
  B --> C[validation and normalisation]
  C --> D[versioned json protocol]
  D --> E[react renderer]
  E --> F[browser]
  • python handles application logic.
  • react handles rendering.
  • communication uses a versioned json protocol over websocket.

project structure

shadlet/
  packages/python/shadlet   python runtime
  packages/renderer         react renderer
  templates                 project templates
  examples                  example applications
  tests                     python tests
  docs                      documentation

examples

  • examples/counter minimal counter
  • examples/todo todo list with forms
  • examples/dashboard dashboard with charts and tables

run any example:

cd examples/counter
PYTHONPATH=../../packages/python python main.py

documentation

full documentation is in docs/ and built with mkdocs.

python -m mkdocs serve
python -m mkdocs build --strict

development

clone and set up:

git clone https://github.com/programmersd21/shadlet
cd shadlet
uv venv --python 3.11
uv pip install -e '.[dev]'
cd packages/renderer && npm ci

checks:

ruff check .
ruff format --check .
mypy .
pyright packages/python/shadlet
pytest
cd packages/renderer && npm run lint && npm run format:check && npm run typecheck && npm run test && npm run build
python -m mkdocs build --strict

compatibility

  • python 3.11 or newer
  • browsers: current evergreen browsers

community

ai assistance and transparency

shadlet is developed by human maintainers with assistance from ai tooling. ai assistance is used for drafting, refactoring, documentation, and review support. all code is reviewed by maintainers and must pass the project's lint, type, test, and build checks before release. see contributing for the ai code policy.

license

mit licensed. see LICENSE for full details.

status

release ready (v0.2.0). see docs/limitations.md for the verified support matrix and capabilities.

Metadata

Release files for shadlet 0.2.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 shadlet 0.2.0
File Size Uploaded Provenance Actions
shadlet-0.2.0.tar.gz 722.0 kB With provenance Details for shadlet-0.2.0.tar.gz

Built distribution (wheel)

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

Total release size: 1.5 MB

Release files / shadlet-0.2.0.tar.gz

Download URL shadlet-0.2.0.tar.gz
Size 722.0 kB
Tags Source
SHA-256 checksum
How to use checksums
3fa30716cf0b5f879847c7c1fdc4e251c328dd58505fa22848ae7db8b2a075e9
BLAKE2b-256 checksum
How to use checksums
35602f3de18035e613a1f30849151c8bcfcc37bea95c109ef334dc835209d540
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

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 Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 3, 2026.

Transparency log

Release files / shadlet-0.2.0-py3-none-any.whl

Download URL shadlet-0.2.0-py3-none-any.whl
Size 739.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
94d07c385a7804fa57b031553e0f92240d33338a4cc0e99f3f095c32ac85a177
BLAKE2b-256 checksum
How to use checksums
c4ed430196b2b44c529f7340ef3dc624b350b4efe414a6c8e6b3e3bf0e48b12d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

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 Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 3, 2026.

Transparency log

Security for shadlet 0.2.0

Provenance

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.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for shadlet-0.2.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 3, 2026.

Transparency log

A note on package security

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.

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