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

Or browse all templates interactively:

zolt templates

Available templates: blank, dashboard, landing, admin, auth, agency

The agency template is a dark premium AI agency landing page with glassmorphism effects, HLS video backgrounds, and animated headings — ready to run with 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()

47+ built-in components

Category Components
Layout Flex, Grid, Stack, Container, Section, Sidebar, Split, Divider, Spacer, List
Display Text, Heading, BlurHeading, Badge, Tag, Avatar, Icon, Image, Link, 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, FloatingNav, Tabs, Breadcrumb, Pagination, Menu
Media Video, VideoBg
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|agency)
zolt templates Browse all templates interactively and scaffold one
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.2.0.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.2.0-py3-none-any.whl (136.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: zolt-1.2.0.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.2.0.tar.gz
Algorithm Hash digest
SHA256 d7843d3ca359666d5f578b2495581c330629ce13986f0545ef6bebead67820ea
MD5 2d3e6d8eb356a8c9425bf9b52888012e
BLAKE2b-256 72fad113c3ec7676f4e4109939e33f87e06e8e56c05589ef5b75a213041afd85

See more details on using hashes here.

Provenance

The following attestation bundles were made for zolt-1.2.0.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.2.0-py3-none-any.whl.

File metadata

  • Download URL: zolt-1.2.0-py3-none-any.whl
  • Upload date:
  • Size: 136.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.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 47990778594a6350fe8a2ff9c677825557bdc00899cbf9758fadb50e5543e075
MD5 cddc892c934c0d61bedd8c6f2b32d51a
BLAKE2b-256 8716890469a091481ff2e760984480da0643f3cb781bc22be505c85408d7dbf1

See more details on using hashes here.

Provenance

The following attestation bundles were made for zolt-1.2.0-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