# Pyzed

> Pyzed is an open-source Python frontend framework for native desktop apps: GPU rendering in Rust with Iced, 90+ components, a drag-and-drop visual designer, themes, node-based shaders, packaging for Windows, macOS and Linux and a built-in AI agent. A modern alternative to tkinter, Kivy and PyQt.

Source: https://albakore.github.io/pyzed/

## Everything Pyzed covers

Pyzed is a library, a visual designer and a set of tools around them. Jump straight to the part you need.

## Everything you need to build a desktop app

From the first sketch to the executable you ship: a visual designer, a component system, a code editor that
knows your project, and a modern UI toolkit with themes and dark mode.

<div class="pz-clip-pair not-content">

</div>

## Draw your windows, then press F5

A form editor in the spirit of Visual Basic and Qt Designer, built with Pyzed itself. What you draw is what
runs: no code generation step, no surprises.

- Drag components from the **toolbox**, nest them in panels, flex rows and grids
- **Smart guides**, snap to grid, align, distribute and anchors like WinForms
- **Properties** and **Events** panels: double-click an event to write its handler
- Saved as a readable `.pzform` plus a plain Python file, run with `pyzed run`

## Reusable components, like Godot scenes

Design a component once and drop it into any form, or inside other components. Each one is an ordinary
`pz.Component` class, so drawing it and writing it by hand are the same thing.

- Typed **properties**, internal state, methods and custom **events**
- **Bindings** that keep child controls in sync with properties
- **Inheritance** and nesting, with responsive layouts
- Appears in the toolbox with its own label, icon and category

## A Python editor that knows your project

Event handlers are written right inside the designer, backed by Astral's **ty** and **ruff** language
servers running in your project's own environment.

- **Completion** with signatures and docstrings, auto-imports and `form.` controls
- **Inline diagnostics** (error lens), a problems list and **code lens** references
- Code folding, minimap, auto-closing brackets, cursor styles and a separate theme
- **Format with ruff** when you apply your changes

## Real projects, managed for you

Every app is a normal [uv](https://docs.astral.sh/uv/) project with its own `.venv`. Pyzed Design creates it,
installs packages and runs the tools, so your forms can import any library from PyPI.

- Add, upgrade and remove **dependencies** from the Project tab
- One click to **lint**, **format** and **type-check** with ruff and ty
- Create a git repository and keep the UI next to your backend code

## An AI agent that builds with you

Describe a screen and the agent in Pyzed Design places the controls, writes the handlers, looks at the result
and checks its code; every change can be undone. Your own coding agent gets the same knowledge through MCP.

- **Any model**: Claude, GPT, Gemini, Copilot, OpenRouter, local models with Ollama, and external agents
- Attach **images**, add **MCP servers**, keep keys in the **system keychain**
- An **MCP server** and **llms.txt** so Cursor, VS Code or Zed write correct Pyzed code
- **`pyzed.agents`** puts the same agent loop inside your own apps

## 90+ ready-made components

Buttons, inputs, tabs, a file tree, a command palette, tables, charts, toasts, dialogs, a code editor with
syntax highlighting, a terminal and a whole workspace with resizable docks. All of them follow the active
theme and can be styled per instance.

- Build them from code with `pyzed.ui`, or place them from the designer's toolbox
- IBM Plex fonts and about **2000 Lucide icons** included

## Whole screens, ready to copy

Dashboards, a login, settings, a chat, a kanban board, a data table, a music player and more: complete,
tested screens built from the component library. Copy one into your project and change what you need.

- Every block has a **dark and light** preview and its full source
- Small, readable files: a good starting point for you or for your AI agent

## Light, dark, and your own themes

One, Ayu and Gruvbox ship with one shared set of color tokens, in light and dark variants. Follow the system appearance,
switch themes at runtime, derive your own in one line or import a Zed theme file.

- 11 built-in themes, one set of color tokens for every component
- Per-window themes and accent colors

## Interfaces that glow

Pyzed draws on the GPU, so a Python app can look like a modern game: frosted **glass** with real backdrop
blur, **bloom** that spills light from bright parts, transparency, rotation and your own WGSL **shaders**.

<p class="pz-center-link not-content"><a href="https://albakore.github.io/pyzed/showcase/">See every demo and how it is made <span aria-hidden="true">→</span></a></p>

## From Snake to a neon shoot 'em up

Everything a 2D game needs is already in Pyzed: a GPU canvas, a loop that runs once per frame, the keys held
down right now, sprites and particles, and the whole widget library for menus and HUDs.

- Three complete games, explained step by step: **Snake**, **Breakout** and **Neon Invaders**
- `pz.frames` for a smooth 60 fps loop, held keys and mouse input
- Bloom, glow and glass on top of the action, written in plain Python

## The libraries you already use

Pyzed is only the interface: the rest of your app is ordinary Python. Runnable demos show how to put a native
desktop front end on the backend stack you know.

- **FastAPI** client with the server embedded in the same process
- **SQLAlchemy** and **SQLModel**: 20,000 rows in a virtual table, forms validated by your models
- **Django**'s async ORM, **httpx** and **Pydantic**, **aiosqlite** and more

## A Python GUI for a new generation

tkinter, Kivy and PyQt made Python desktop apps possible. Pyzed makes them look and feel like the tools you
use every day, and is honest about where the others still win.

## Batteries included

The details that turn a prototype into an app people enjoy using.

pyzed dev</code> and <code>pyzed run --reload</code>.',
href: '/pyzed/reference/app/#run',
icon: 'rocket',
shot: 'hot-reload-after',
alt: 'An app updated by hot reload, keeping its click count',
},
{
title: 'Command palette and shortcuts',
text: 'Commands with key bindings, fuzzy search and a file finder, ready to drop into your app.',
href: '/pyzed/guides/keyboard/',
icon: 'magnifier',
shot: 'zed-command-palette',
alt: 'The command palette open over the editor',
wide: true,
},
{
title: 'Rows, columns, grids and docks',
text: 'Flex layouts, CSS-like grids with <code>fr</code> tracks, scrolling, and a workspace with docks you can drag and resize.',
href: '/pyzed/guides/layout/',
icon: 'seti:html',
shot: 'tutorials/layout',
alt: 'A grid layout with a spanning header and flex rows',
wide: true,
},
{
title: 'Async and multiple windows',
text: '<code>async</code> callbacks never freeze the UI; <code>pz.every</code> and <code>pz.listen</code> handle timers and streams; each <code>pz.Window</code> has its own theme.',
href: '/pyzed/guides/windows/',
icon: 'random',
},
{
title: 'Languages',
text: 'Translate with <code>pz.t</code> and switch the language while the app runs, plurals included.',
href: '/pyzed/guides/i18n/',
icon: 'translate',
},
{
title: 'Ship it: pyzed build',
text: 'One command packages your project as a standalone app for Windows, macOS or Linux, with Python inside.',
href: '/pyzed/packaging/build/',
icon: 'download',
},
{
title: 'Cross-platform',
text: 'Linux, macOS and Windows, rendered with wgpu and a tiny-skia fallback when there is no GPU.',
href: '/pyzed/getting-started/installation/',
icon: 'laptop',
},
{
title: 'Canvas and charts',
text: 'Draw shapes, paths and text with transforms and mouse events, or use the ready-made charts.',
href: '/pyzed/guides/canvas/',
icon: 'analytics',
},
{
title: 'Headless screenshots',
text: '<code>app.screenshot("ui.png")</code> renders off-screen for tests and docs. Every image on this site is made that way.',
href: '/pyzed/guides/testing/',
icon: 'approve-check-circle',
wide: true,
},
{
title: 'Simple architecture',
text: 'State, <code>update</code> and <code>view</code> without the ceremony: a button can call <code>self.save</code> directly.',
href: '/pyzed/guides/how-it-works/',
icon: 'information',
},
]}
/>

## An app in 20 lines

Prefer to write everything by hand? Pyzed is a regular Python library. This is a complete app:

```python title="counter.py"
import pyzed as pz
from pyzed import ui

class Counter(pz.App):
    title = "Counter"
    size = (360, 220)

    def __init__(self):
        self.count = 0

    def add(self, step):
        self.count += step

    def view(self):
        return pz.center(pz.column([
            ui.heading(str(self.count)),
            pz.row([
                ui.button("1", lambda: self.add(-1), icon="minus"),
                ui.button("1", lambda: self.add(1), icon="plus", variant="solid"),
                ui.icon_button("rotate-ccw", lambda: setattr(self, "count", 0)),
            ], spacing=8),
        ], spacing=16, align="center"), bg=self.theme.editor)

pz.run(Counter)
```

## Explore the docs

Pick a starting point.

- [Quickstart](https://albakore.github.io/pyzed/getting-started/quickstart/): Install Pyzed and create your first window.
- [Component library](https://albakore.github.io/pyzed/library/): Every component with a preview, what it does and how to use it.
- [Pyzed Design manual](https://albakore.github.io/pyzed/editor/): Each panel of the editor explained, with tips and shortcuts.
- [Blocks](https://albakore.github.io/pyzed/blocks/): Complete screens to copy: dashboard, login, settings, chat, kanban…
- [Showcase](https://albakore.github.io/pyzed/showcase/): Glass, bloom, shaders and game-style interfaces, with their code.
- [Making games](https://albakore.github.io/pyzed/games/): Snake, Breakout and Neon Invaders, step by step.
- [Integrations](https://albakore.github.io/pyzed/integrations/overview/): FastAPI, SQLAlchemy, SQLModel, Django, httpx and Pydantic.
- [Pyzed for AI agents](https://albakore.github.io/pyzed/ai/): The agent in the designer, the MCP server, llms.txt and pyzed.agents.
- [Why Pyzed](https://albakore.github.io/pyzed/why/): How Pyzed compares with tkinter, Kivy, PyQt and Flet, with benchmarks.
- [Tutorial: to-do list](https://albakore.github.io/pyzed/tutorials/basic/todo-app/): State, forms, lists and shortcuts, step by step.

**Start building today**

Free and open source. Get the designer as a standalone app, or install the library with pip.
