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.0.tar.gz (2.5 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.0-py3-none-any.whl (120.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: zolt-1.1.0.tar.gz
  • Upload date:
  • Size: 2.5 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.9

File hashes

Hashes for zolt-1.1.0.tar.gz
Algorithm Hash digest
SHA256 e6e772151fcf07001604229094dde30b19cffebee4f66a5beca61e095ad8a162
MD5 46ff386ed2a626b4a4f8683a590ef105
BLAKE2b-256 e318d9a90149af9277ab4d4d9a8da53ce5eff0abd9008bb9b310e7bec5c7707e

See more details on using hashes here.

File details

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

File metadata

  • Download URL: zolt-1.1.0-py3-none-any.whl
  • Upload date:
  • Size: 120.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.9

File hashes

Hashes for zolt-1.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 4e5a5a273eaf0c5fc89cf885672a975485786123849fed1383b178188d13e8c0
MD5 8d83e0ed1c21e408dda826217f458a46
BLAKE2b-256 c2a56ef7e85d13f19957bd79baacc322204307cf56dbec08a5440efed4a84421

See more details on using hashes here.

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