pyscript: 直接在浏览器中用 Python 创建应用程序

2025年10月04日 02:30:45
22120
python
pyscript pyscript/pyscript

在 HTML 文件中直接使用 Python 编程语言,像 JavaScript 文件一样引入和执行 Python 代码,支持更小的 MicroPython、常见第三方库和操作页面元素等功能,适用于快速创建交互的数据可视化、网站原型和在线教育等 Web 应用场景。

项目大小 17.98 KB
涉及语言 Python 48.70% JavaScript 29.85% HTML 20.37% Makefile 0.66% CSS 0.43%
许可协议 LICENSE
仓库同步说明
  • • 同步需要仓库写入权限以创建目标仓库
  • • 使用平台账号授权登录后将同步到您平台下的个人仓库

PyScript

PyScript is an open source platform for Python in the browser.

Using PyScript is as simple as:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
html>
<html lang="en">
    <head>
        <meta charset="utf-8" />
        <meta name="viewport" content="width=device-width,initial-scale=1" />
        <title>PyScript!title>
        <link
            rel="stylesheet"
        />
        <script
            type="module"
        >script>
    head>
    <body>
         
        <script type="mpy" terminal>
            print("Hello, world!")
        script>
    body>
html>

PyScript enables the creation of rich Python applications in the browser using
Pyodide (a version of
CPython), MicroPython,
WASM, and modern web technologies. It means Python
now runs anywhere a browser runs: desktop, laptop, mobile, tablet, or any other
browser enabled device.

To start building, read the
Beginning PyScript tutorial.

For example applications, see here.

Other useful resources:

Every Tuesday at 15:30 UTC there is the PyScript Community Call on zoom,
where we can talk about PyScript development in the open. Most of the
maintainers regularly participate in the call, and everybody is welcome to
join. This meeting is recorded and uploaded to our YouTube channel.

Every other Thursday at 16:00 UTC there is the PyScript FUN call: the focus
of this call is to share fun projects, goofy hacks or clever uses of PyScript.
It’s a supportive, energetic and entertaining meeting. This meeting is also
recorded and uploaded to our YouTube channel.

For more details on how to join the calls and up to date schedule, consult the
official calendar:

Contribute

For technical details of the code, please see the README in
the core directory.

Read the contributing guide
to learn about our development process, reporting bugs and improvements,
creating issues and asking questions.

Check out the development process
documentation for more information on how to setup your development environment.

Governance

The PyScript organization governance
is documented in a separate repository.

Supporters

PyScript is an independent open source project.

However, PyScript was born at Anaconda Inc and its
core contributors are currently employed by Anaconda to work on PyScript. We
would like to acknowledge and celebrate Anaconda’s continued support of this
project. Thank you Anaconda Inc!


                

                

免责声明 © 2026 - 虚宝阁

本站部分源码来源于网络,版权归属原开发者,用户仅获得使用权。依据《计算机软件保护条例》第十六条,禁止:

  • 逆向工程破解技术保护措施
  • 未经许可的分发行为
  • 去除源码中的原始版权标识

※ 本站源码仅用于学习和研究,禁止用于商业用途。如有侵权, 请及时联系我们进行处理。

侵权举报请提供: 侵权页面URL | 权属证明模板

响应时效:收到完整材料后48小时内处理

相关推荐

YOLOv8-目标检测界的闪电侠

YOLOv8-目标检测界的闪电侠

YOLO系列的最新版,主打“又快又准”的目标检测。能瞬间识别图片/视频里的人、车、动物、物体,在普通显卡上就能实时处理视频流,工业级场景都在用它。

47034 2025-09-13
Stable Diffusion AI绘画界的 扛把子

Stable Diffusion AI绘画界的 扛把子

提到AI画图,没人能绕开Stable Diffusion!由Stability AI开源,支持文本生成图像、图像修复、风格迁移,关键是完全免费商用(非商用更没问题),普通电脑装个WebUI就能玩到飞起。

41831 2025-09-13
scira: AI 驱动搜索引擎

scira: AI 驱动搜索引擎

极简的 AI 驱动搜索引擎,支持引用来源

10827 2025-10-20
n8n: AI自动化工作流工具

n8n: AI自动化工作流工具

基于节点的自动化工作流工具,能帮助用户轻松创建和管理复杂的自动化流程,无需编写大量代码。并且内置了AI能力,支持 400+ 应用和服务!

146989 2025-09-26
fastapi: Python web api 框架

fastapi: Python web api 框架

一个基于 Python 3.6+ 版本的异步 WEB 应用框架,使用 Python 类型注解构建 web API 。主要特点有: 高性能:与 Node JS 和 Go 相当。 编码快:将开发功能的速度提高 2~3 倍。 Bug少:减少大约 40% 的由开发人员导致的错误。 直观:强大的编辑器支持,可智能感知和补全代码。 简单:易于学习和使用,减少文档阅读时间。 简短:尽量减少代码重复。 健壮:获得可用于生产的代码,具有自动交互文档。 基于标准:基于 OpenAPI 和 JSON Schema 。

90539 2025-09-16
presenton AI PPT 生成器

presenton AI PPT 生成器

一个免费的、能完全在你自己电脑上运行的 AI PPT 生成工具。和那些必须联网、依赖服务商云服务的工具不同,Presenton 的核心优势在于本地优先和开放可控。 你的数据你做主, 所有生成演示文稿的过程都在你的电脑上完成。这意味着你的内容创意、上传的文件等敏感信息,无需上传到第三方云端服务器,隐私更有保障。自由选择AI模型,它不绑定任何一家 AI 服务商。你可以灵活选择。

2412 2025-09-14
langchainjs: 用语言模型构建模块化AI应用

langchainjs: 用语言模型构建模块化AI应用

帮助你用大型语言模型(如 GPT)构建模块化智能应用。 想做 AI 代理?做会读 PDF 的问答机器人?轻松搞定。 简直是生成式 AI 的乐高积木。

15824 2025-10-01
经典中文DOS游戏资源库

经典中文DOS游戏资源库

如果你对上个世纪 9 0年代的经典中文 DOS 游戏,诸如《仙剑奇侠传》、《金庸群侠传》、《大富翁》等充满怀念,这个开源项目绝对是一个宝。目前它已经汇集了惊人的 1898款 中文DOS游戏,堪称目前网络上最全的同类合集之一。 你只需在电脑上安装 Python 3,然后在项目目录下运行 python download_data.py 这个命令。脚本会根据 games.json 中的信息,自动从互联网上的可*存档源(如 Internet Archive)下载对应的游戏文件。

9756 2025-09-09
Whisper-OpenAI的语音魔术师

Whisper-OpenAI的语音魔术师

OpenAI开源的语音识别模型,能把语音转文字、文字转语音,还支持99种语言!关键是准确率超高,连带口音的中文、英文都能轻松识别,简直是会议记录、视频字幕的救星。

89153 2025-09-13
refine: 企业级React后台框架

refine: 企业级React后台框架

这是一个专为构建 CRUD(增删改查)应用设计的 Web 框架,只需一行命令即可生成项目骨架,内置登录、列表、详情、编辑页面等功能。业务逻辑与 UI、路由完全解耦,可灵活集成 Ant Design、Material-UI 等设计系统,适用于快速开发管理后台、仪表盘、内部工具和 B2B 应用。

32865 2025-09-13
Claudable:基于 Next.js 框架的网站生成器

Claudable:基于 Next.js 框架的网站生成器

把你用自然语言描述的应用想法,直接变成可以运行的网站代码。Claudable 背后依赖强大的 AI 编程助手,主要是 Claude Code,也支持 Cursor CLI 来理解你的需求并生成代码。你不需要懂复杂的 API 设置、数据库配置或者部署流程:用简单的语言告诉 Claudable 你想要什么应用。

2525 2025-09-15

仓库下载

gitee

GitHub 下载代理

文件信息

文件名
文件大小
文件类型
代理耗时