Create a project
Pyzed installs the pyzed command. It creates a complete project with uv, a tool that
installs Python packages and keeps each project in its own environment (the pip and python tabs install uv for you):
uvx --from pyzed-ui pyzed new my-app # uvx runs pyzed without installing itcd my-appuv run pyzed design # open the main form in the visual designeruv run pyzed run # run the apppip install pyzed-ui uv # with your .venv activepyzed new my-appcd my-appsource .venv/bin/activate # the project's own .venvpyzed design # open the main form in the visual designerpyzed run # run the apppip install pyzed-ui uv # with your .venv activepyzed new my-appcd my-app.venv\Scripts\Activate.ps1 # the project's own .venvpyzed design # open the main form in the visual designerpyzed run # run the apppython3 -m pip install pyzed-ui uvpython3 -m pyzed new my-appcd my-app.venv/bin/python -m pyzed design # open the main form in the visual designer.venv/bin/python -m pyzed run # run the apppy -m pip install pyzed-ui uvpy -m pyzed new my-appcd my-app.venv\Scripts\python -m pyzed design # open the main form in the visual designer.venv\Scripts\python -m pyzed run # run the appThis generates a standard uv project:
my-app/├── pyproject.toml # dependencies (pyzed-ui; ruff and ty for development) + [tool.pyzed]├── uv.lock├── .venv/├── .git/├── src/my_app/ # backend└── ui/ # forms (.pzform) and their event handlers (.py)The UI folder keeps the interface apart from the rest of the code, and its handlers can import the backend, any
module of the project and every dependency. Already have a project made with uv init? Run pyzed init inside
it. See Projects with uv for the layout, dependency commands and the designer’s
Project tab, and Build and distribute to package the app for each platform.
A single-file app
Section titled “A single-file app”To start from code instead of the designer, --script creates one main.py without uv:
uvx --from pyzed-ui pyzed new my-app --scriptcd my-appuv run --with pyzed-ui main.pypyzed new my-app --script # with your .venv activecd my-apppython main.pypython3 -m pyzed new my-app --scriptcd my-apppython3 main.pypy -m pyzed new my-app --scriptcd my-apppy main.pyThe template already includes:
- A
ui.workspacewith a title bar, left panel and status bar. - Navigation between pages with
ui.list_item. - A command palette that opens with Ctrl+Shift+P and closes with Esc.
- A button to switch between light and dark themes.
Find icons
Section titled “Find icons”Pyzed includes the ~2000 Lucide icons. To search for names:
uv run pyzed icons folder# folder, folder-open, folder-git, folder-plus, ...pyzed icons folder# folder, folder-open, folder-git, folder-plus, ...python3 -m pyzed icons folder# folder, folder-open, folder-git, folder-plus, ...py -m pyzed icons folder# folder, folder-open, folder-git, folder-plus, ...Use them with pz.icon("folder") or with the icon= parameter of components.
Run as a module
Section titled “Run as a module”python -m pyzed is equivalent to the pyzed command:
uv run python -m pyzed new another-apppython -m pyzed new another-apppython3 -m pyzed new another-apppy -m pyzed new another-app