Skip to main content

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

Project description

Zeno

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

PyPI Python License: MIT Tests

Zeno 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 zeno-py

Requires Python 3.10+.


Quick start

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

Or scaffold a dashboard:

zeno new my-dash --template dashboard
cd my-dash
zeno 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 Zeno", 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:

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

Plugin system

from pyui.plugins import PyUIPlugin, register_component

class ChartsPlugin(PyUIPlugin):
    name = "zeno-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:

zeno 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)
  • zeno lint — component tree validation
  • zeno doctor — environment health check
  • zeno 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.0.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.0.0-py3-none-any.whl (120.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: zolt-1.0.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.0.0.tar.gz
Algorithm Hash digest
SHA256 0ad09bd957cd0c1657665af8b0a05ef6d4eb6b4ae4b4dafda312f5b7be38acc7
MD5 5e7837b09e5df71c9a8ed227e1a1ea4c
BLAKE2b-256 6180c025969a66de508c65167931d8f66a29aa95f72d9fb986350ffe61e99989

See more details on using hashes here.

File details

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

File metadata

  • Download URL: zolt-1.0.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.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 2f4fb40f118c1656dbddf39893ed4b47d4d4135911bebd22b15555a6eb97d973
MD5 08400a59878b7c27bf37dee2e0f92353
BLAKE2b-256 6f0b67c8c0d56933fc31338bdc5032d2341ea0096222640e8cbd676d98164610

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