Skip to main content

EchoUI — Universal Python-first UI framework

One Screen–Stage–Sprite paradigm compiles to Web, desktop, mobile, TUI, and GUI.

Version: 1.2.13 · License: MIT · PyPI: pip install echoui · GitHub: nichengfuben/echoui

诚实说明:包可安装、机器门禁可绿,不等于 PLAN 字面全能力闭环。请以下方能力矩阵为准。

像 npm 一样用

npm EchoUI
npm install pip install echoui[web]
npm start echoui start
npm run build echoui run build 或 echoui build --target web
npm run dev echoui dev / echoui run dev
pip install echoui[web]
echoui new my-app
cd my-app
pip install -e .
echoui start

脚本定义在 pyproject.toml 的 [tool.echoui.scripts](同 npm 的 package.json scripts):

[tool.echoui.scripts]
start = "dev --port 8765"
build = "build --target web"

PyPI 尚未发布目标版本时,可从 GitHub 安装:

pip install "echoui[web] @ git+https://github.com/nichengfuben/echoui.git"

Quick Start(已有 main.py)

from echoui import App, Screen, Store, col, text, button

class CounterStore(Store):
    count: int = 0

store = CounterStore()

class Counter(Screen):
    def build(self):
        return col(
            text(lambda: f"Count: {store.count}"),
            button("+1", on_click=lambda: setattr(store, "count", store.count + 1)),
        )

app = App(screens=[Counter], initial="Counter")
echoui build --target web
echoui dev --port 8765

能力矩阵(诚实)

领域 状态 说明
反应式 Signal/Store/computed done 细粒度更新,无 VDOM
Web 编译 (DOM + runtime JS) done echoui build --target web
Static SSG done 预渲染 HTML
路由 / 表单校验 / REST+query partial lazy loader + group/parent/current_layouts + validate_async 已验;upload_chunked + progress 已验;深嵌套 layout 语义仍浅
api.ws / api.sse 客户端 partial aiohttp 真传输(单测 live mock);无 aiohttp 时降级
存储 local/session partial 默认可切 FileBackend;sqlite 真
动画 tween/spring + FLIP partial 具名 easing + flip/capture_rects;列表 emit 接线有限
Camera / MotionChain .then_ partial shake/zoom/deadzone / 属性链已接
Canvas fluent / VirtualList emit partial web 窗口化接线有限
workers 线程池 partial ThreadPoolExecutor;wasm 仍弱
GUI / desktop / TUI / mobile 目标 interface-only~partial 产物壳或 Qt 子集;非完整原生树
iOS 真机 .ipa B 类 需 macOS/CI;仓库为 web bundle 壳
平台 clipboard/notifications partial 宿主内存桥(测/演示);非系统 API
生物识别/蓝牙/NFC 等 interface-only 无桥时 UnsupportedCapability,不静默成功
媒体 camera/geo/sensors partial 无桥抛 UnsupportedCapability;enable_media_sim 内存桩
RTC DataChannel partial 进程内 peer 投递;非浏览器 WebRTC
物理 AABB / 可选 pymunk partial 默认 AABB;create_world("pymunk") 需 echoui[physics];非完整 Box2D
TMX 图块 partial load_tmx 正交 CSV/base64(+gzip/zlib)+ object layer 点/矩形/gid 子集;无 infinite / zstd / 完整 polygon 顶点
IME composition / 文件 DnD partial Python API + Web composition*/drop;drop_targets IR→client_cfg 已贯通;非桌面原生全路径
RTL / safe-area 样式 partial rtl/ltr/safe_area/writing_mode → CSS;非完整双向布局引擎
pathfind + tile solid partial astar_on_tilemap / passable_from_tilemap
真设备桥 / 浏览器 WebRTC stub / 待做 硬件原生与 ICE 仍弱

图例:done = 可依赖的 A 类实现 · partial = 子集真 · interface-only = 可 import 但勿当生产完成。

CLI

Command Description
echoui new [name] 脚手架(main.py + pyproject.toml)
echoui start 启动开发服务器(同 npm start,默认 8765)
echoui run <script> 运行 pyproject 脚本(同 npm run)
echoui dev 开发服务器(watch + 静态服务)
echoui build --target web|static|tui|desktop|gui|android|ios 编译
echoui preview 预览已 build 的 dist
echoui check 校验项目
echoui version 版本

示例

examples/ 含 hello、counter、跑酷 06_runner、全功能 dashboard 07_full_web 等。

License

MIT — see LICENSE.

Metadata

Release files for echoui 1.2.14

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for echoui 1.2.14
File Size Uploaded
echoui-1.2.14.tar.gz 177.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for echoui 1.2.14
File Interpreter ABI Platform
echoui-1.2.14-py3-none-any.whl Python 3 none any Details

Total release size: 314.3 kB

Release files / echoui-1.2.14.tar.gz

Download URL echoui-1.2.14.tar.gz
Size 177.7 kB
Tags Source
SHA-256 checksum
How to use checksums
d085e434321e0f6106ef30968d6263e650fdfc71bc5f211f15142f2f113d071b
BLAKE2b-256 checksum
How to use checksums
eaf1b9aea9129a261f8d499400f13693f7935704202c27258579ec5976af9aa3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.6

Release files / echoui-1.2.14-py3-none-any.whl

Download URL echoui-1.2.14-py3-none-any.whl
Size 136.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d79ef1d2b5de5161f92d6f40f33815c1f6831d862865cb983cece2395fac640f
BLAKE2b-256 checksum
How to use checksums
d0fa108482695c03d8a22a1d9081a85b82401f4db1ab1068c6535c6e2904a8f2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.6

Release history Release notifications | RSS feed

2.0.0

2 release files

This release

1.2.14 This release

2 release files

1.2.12

2 release files

1.2.11

2 release files

1.2.10

2 release files

1.2.8

2 release files

1.2.7

2 release files

1.2.6

2 release files

1.2.5

2 release files

1.2.4

2 release files

1.2.3

1 release file

1.2.2

2 release files

1.2.1

2 release files

1.0.1

2 release files

1.0.0

2 release files

0.9.3

2 release files

0.9.2

2 release files

0.9.1

2 release files

0.9.0

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page