Skip to main content

Write Python, render anywhere — web, desktop, and CLI from one codebase.

Project description

Zolt

Write Python. Render anywhere.
Web · Desktop · Terminal — from a single Python codebase.

PyPI Python License: MIT Tests

Zolt is a production-ready Python UI framework. Write your entire UI in pure Python — no HTML, no CSS, no JavaScript. One codebase compiles to a web app, a native desktop window, and a terminal UI.


Install

pip install zolt

Requires Python 3.10+.


Quick start

zolt new my-app
cd my-app
zolt run          # → http://localhost:8000

Or scaffold a dashboard:

zolt new my-dash --template dashboard
cd my-dash
zolt run

Hello World

from pyui import App, Button, Flex, Heading, Page, Text, reactive

class HomePage(Page):
    title = "Home"
    route = "/"

    def compose(self):
        with Flex(direction="col", align="center", gap=6):
            Heading("Hello from Zolt", level=1)
            Text("Built with pure Python.").style("muted")
            Button("Get Started").style("primary").size("lg")

class MyApp(App):
    name = "My App"
    home = HomePage()

Run it:

zolt run app.py                    # web browser
zolt run app.py --target desktop   # native window
zolt run app.py --target cli       # terminal

Reactive state

from pyui import App, Button, Flex, Page, Text, reactive

_count = reactive(0)

class CounterPage(Page):
    title = "Counter"
    route = "/"

    def compose(self):
        with Flex(direction="col", align="center", gap=4):
            Text(lambda: f"Count: {_count.get()}").style("lead")
            with Flex(gap=3):
                Button("−").style("ghost").onClick(lambda: _count.set(_count.get() - 1))
                Button("+").style("primary").onClick(lambda: _count.set(_count.get() + 1))

class CounterApp(App):
    count = _count
    home = CounterPage()

42+ built-in components

Category Components
Layout Flex, Grid, Stack, Container, Sidebar, Split, Divider, Spacer, List
Display Text, Heading, Badge, Tag, Avatar, Icon, Image, Markdown, Video
Input Button, Input, Textarea, Select, Checkbox, Radio, Toggle, Slider, DatePicker, FilePicker, Form
Feedback Alert, Toast, Modal, Drawer, Tooltip, Progress, Spinner, Skeleton
Navigation Nav, Tabs, Breadcrumb, Pagination, Menu
Data Table, Stat, Chart

6 built-in themes

class MyApp(App):
    theme = "dark"   # light · dark · ocean · sunset · forest · rose

Custom theme:

class MyApp(App):
    theme = {"color.primary": "#FF6B6B", "color.background": "#FFF5F5"}

CLI reference

Command Description
zolt new <name> Scaffold a new project (--template blank|dashboard|landing|admin|auth)
zolt run [app.py] Start dev server with hot reload (--target web|desktop|cli)
zolt build [app.py] Production build (--target web|desktop|cli|all)
zolt storybook Open component gallery
zolt doctor Check environment health
zolt lint [app.py] Lint component definitions
zolt search <query> Search PyPI for zolt-* packages
zolt publish Publish a component package to PyPI
zolt info Show version info

Plugin system

from pyui.plugins import PyUIPlugin, register_component

class ChartsPlugin(PyUIPlugin):
    name = "zolt-charts"
    version = "1.0.0"

    def on_load(self, app):
        register_component("LineChart", LineChartComponent)

class MyApp(App):
    plugins = [ChartsPlugin()]

Example apps

Five full example apps are in examples/:

App Description
dashboard/ Analytics dashboard with stats, chart, table
todo/ Reactive todo list
blog/ Content site with routing
ml-demo/ ML inference UI
admin/ CRUD admin panel

Run any example:

zolt run examples/dashboard/app.py

What's included

  • ✅ Web renderer (HTML + Tailwind CSS + Alpine.js)
  • ✅ Desktop renderer (tkinter, optional sv-ttk)
  • ✅ CLI renderer (Rich TUI)
  • ✅ Reactive state (reactive, computed, store)
  • ✅ Theme engine (6 built-in themes + custom tokens + Figma export)
  • ✅ Plugin system with lifecycle hooks
  • ✅ Hot reload (file save → browser update)
  • ✅ Dev tools panel (state inspector, event log)
  • ✅ Error overlay with structured error codes (PYUI-NNN)
  • zolt lint — component tree validation
  • zolt doctor — environment health check
  • zolt publish — marketplace publishing via PyPI

Contributing

See CONTRIBUTING.md. Issues labelled good-first-issue are a great place to start.

License

MIT — see LICENSE.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

zolt-1.1.1.tar.gz (2.6 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

zolt-1.1.1-py3-none-any.whl (122.3 kB view details)

Uploaded Python 3

File details

Details for the file zolt-1.1.1.tar.gz.

File metadata

  • Download URL: zolt-1.1.1.tar.gz
  • Upload date:
  • Size: 2.6 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for zolt-1.1.1.tar.gz
Algorithm Hash digest
SHA256 66053eb987e657ddd17baafa1631a8a39ea9949c57d9f7d472658f1d9a1a99ab
MD5 4729beb2e5ab4f50ea7813acca260055
BLAKE2b-256 aa2285bb4e128d8a9ce4fba5abf655ddf2e17657bbfd7c3a0d71dad497459dc2

See more details on using hashes here.

Provenance

The following attestation bundles were made for zolt-1.1.1.tar.gz:

Publisher: publish.yml on 12errh/Zolt

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file zolt-1.1.1-py3-none-any.whl.

File metadata

  • Download URL: zolt-1.1.1-py3-none-any.whl
  • Upload date:
  • Size: 122.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for zolt-1.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 54a60e73fa8db8de5f9919cd26ac734c5f6c28925e428a5f1fc0ddfa224668ee
MD5 a99710c56097d7531d43629bc7c6789e
BLAKE2b-256 f542715cdcd7c7e3d33d43cb01a643be77331195b6a97a30cca52236c42b3d21

See more details on using hashes here.

Provenance

The following attestation bundles were made for zolt-1.1.1-py3-none-any.whl:

Publisher: publish.yml on 12errh/Zolt

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page