npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

ppx-js

v6.0.0

Published

JavaScript RPC client and events for PPX desktop applications

Readme

ppx-js

PPX 是一个开源的跨平台桌面应用框架:用 Python 编写业务,用 JavaScript 构建界面,为 Windows、macOS 和 Linux 生成桌面客户端。可以选择 Vanilla JavaScript、Vue 或 React,不需要维护 pywebview 入口、PyInstaller spec 或安装器脚本。

项目源码 · 完整教程 · 下载安装包 · 问题反馈

PPX 由两个包配合工作:ppx-py 提供 Python 运行时、开发命令和三端打包;ppx-js 提供前端调用、事件订阅和 TypeScript 声明。旧 V5 项目请查阅 V5 归档文档,两代接口不能直接混用。

PPX 的轻量 JavaScript RPC 客户端。它只负责 Web 页面与 ppx-py 之间的稳定调用和事件边界,不依赖 Vue、Element Plus 或其他 UI 框架。

pnpm add [email protected]
import { ppx } from 'ppx-js'

const owner = await ppx.call('system.getOwner')
const stop = ppx.on('changed', (data) => console.log(data))
stop()

RPC 默认使用 30 秒总超时,覆盖等待桥接和等待 Python 的完整过程,可用第三个参数调整:

await ppx.call('report.create', { id: 1 }, { timeoutMs: 60_000 })

本包包含 TypeScript 声明,并可在 SSR/Node 环境中安全导入;实际调用只能发生在 PPX 的 pywebview 页面内。

每次调用在浏览器侧生成 requestId,并传给 Python。调用失败统一抛出 PpxError;超时和底层传输失败也会携带 requestId。可根据 error.code 处理 BRIDGE_UNAVAILABLE、BRIDGE_ERROR、TIMEOUT、METHOD_NOT_FOUND、INVALID_PARAMS、INVALID_RESULT 和业务侧返回的其他稳定错误码。

完整文档:PPX JavaScript API

支持 PPX

如果 PPX 帮助你完成了项目,欢迎 Star、提交问题或参与改进。也可以通过以下二维码支持开源维护,感谢每一份支持。

| 微信支付 | 支付宝 | | --- | --- | | | |

关注公众号

更多 Python、Web 和桌面开发教程,请关注 潘高陪你学编程。

开源协议

本项目使用 AGPL-3.0-only 协议。