Skip to content

pywire/pywire

Repository files navigation

pywire

HTML-over-the-wire Python web framework.

Build reactive web apps in pure Python — no JavaScript required. PyWire renders HTML on the server and pushes updates over WebSocket, giving you the reactivity of a SPA without writing a line of frontend code.

uvx create-pywire-app

Documentation: pywire.dev/docs


What's in this repo

This is the PyWire monorepo. All packages are developed and released from here.

Package Description PyPI / Marketplace
packages/pywire Core framework — Starlette-based runtime, .wire compiler, CLI PyPI
packages/pywire-auth Authentication — OAuth2/OIDC providers, local IdP, policies, live auth PyPI
packages/pywire-language-server LSP server for .wire files (completions, diagnostics, hover) PyPI
packages/create-pywire-app Project scaffolding CLI — uvx create-pywire-app PyPI
packages/vscode-pywire VS Code extension — syntax highlighting, LSP integration VS Code
packages/prettier-plugin-pywire Prettier formatter for .wire files -
packages/tree-sitter-pywire Tree-sitter grammar for .wire syntax PyPI
docs Documentation site — pywire.dev/docs

Quick start

You need uv installed.

uvx create-pywire-app   # scaffold a new project
cd my-app
uv run pywire dev       # start dev server with hot reload

Or with the installer script (handles uv setup too):

# macOS / Linux
curl -fsSL pywire.dev/install | sh

# Windows (PowerShell)
irm pywire.dev/install.ps1 | iex

How it works

PyWire pages are .wire files — a template format that embeds Python, HTML, CSS, and even JS in a single file:

---
count = wire(0)
---
<button @click={count += 1}>Clicked {count} times</button>
  • Server renders HTML on initial load and after every event
  • WebSocket pushes diffs back to the browser — no full page reloads
  • wire() variables are reactive — changing them triggers a re-render of affected regions
  • .wire files are compiled to Python at startup; the Rust parser (tree-sitter) handles the custom syntax

Development setup

This repo uses uv for Python packages and pnpm for Node packages.

./scripts/install   # uv sync + pnpm install + build TypeScript client
./scripts/check     # format check + type-check + test across all packages and supported versions
./scripts/test      # run core Python + client TypeScript tests
./scripts/lint      # run the formatter across all projects

Contributing

  • PRs require squash merge and 1 approving review
  • All relevant CI checks must pass before merge
  • Follow Conventional Commits — releases are automated via release-please
  • Valid scopes: pywire, pywire-language-server, tree-sitter-pywire, vscode-pywire, prettier-plugin-pywire, create-pywire-app, pywire-docs

Support

If PyWire is helping you build, consider supporting the project. Donations cover documentation hosting, CI/CD, and development time.

GitHub Sponsor Ko-Fi

About

pywire monorepo

Resources

Contributing

Stars

Watchers

Forks

Sponsor this project

Packages

 
 
 

Contributors