Skip to main content Switch to mobile version pypixel-core 0.4.1 An AI agent-friendly pygame framework for pixel-art GUIs and 2D games, with headless UI interaction and structured QA results
pip install pypixel-core Copy PIP instructions
PyPixelCore 是对 AI 智能体友好的像素 GUI 与 2D 游戏框架,基于 pygame,提供像素控件、声明式布局、主题和动画。
开发者可以给控件设置稳定的 qa_id。智能体通过内置 QA 探针按 ID 定位控件,在无头模式下模拟点击并验证界面变化。例如,打开设置页后,它可以断言页面标题已显示;如果按钮被裁剪,还可以读取可见区域和失败原因,按需查看截图。
发行名为 pypixel-core,Python 导入名为 PyPixelCore。发布到 PyPI 后可用 python -m pip install pypixel-core 安装。
使用 Python 3.10 或更高版本。从源码安装时,在本仓库根目录运行:
python -m pip install . 应用从 PyPixelCore 导入框架。窗口、按钮和 QA 工厂的示例见快速开始。查找控件或验证交互见按任务开发。
正式文档、框架说明与开发技能和代码一起打包,pip install pypixel-core 后位于 site-packages/PyPixelCore/docs/,离线可读:
python -c "import PyPixelCore, pathlib; print(pathlib.Path(PyPixelCore.__file__).parent / 'docs')" 阅读目的 文档 文档总目录 文档中心 第一个窗口 快速开始 按任务选择控件、验证交互 按任务开发 控件构造参数与行为 控件手册 框架分层与依赖边界 架构约定 版本历史 变更记录 开发与打包
python -m pip install -e . python -m unittest discover -s tests/core python -m pip install build twine python -m build python -m twine check --strict dist/*.whl dist/*.tar.gz 版本来自 PyPixelCore/version.py。构建生成源码包和 wheel,保存在 dist/。发布时向 PyPI 上传本次构建的两个文件。二维码、OpenGL 和录屏的可选依赖分别通过 .[qr]、.[opengl]、.[recording] 安装。
双击仓库根目录的 publish-pypi.bat。脚本使用项目的 .venv,首次运行会按需创建环境并安装构建工具。每次在新的 dist/release-*/ 目录内构建 wheel 和源码包,校验通过后上传到正式 PyPI。按终端提示粘贴 PyPI API token;已配置 TWINE_PASSWORD 时会自动使用。仅验证构建可运行 .\publish-pypi.bat --check。
发布新代码前更新 PyPixelCore/version.py 中的 __version__。同一次发布中断后可用相同源码和版本重跑,PyPI 上已存在的文件会跳过。
如果隐藏输入框难以粘贴,可运行 .\publish-pypi.bat --clipboard。等脚本提示后,复制完整的 pypi-…,回到终端只按回车。脚本会读取一次 Windows 剪贴板,检查格式并将凭据交给 Twine。若已得到 Verified artifacts,可在仓库根目录用下面的 PowerShell 命令重传同一批文件,把目录换成日志中的实际路径。
$release = 'dist/release-示例' .\.venv\Scripts\python.exe scripts/upload_pypi.py --clipboard "$release/*.whl" "$release/*.tar.gz" 框架使用木兰宽松许可证第 2 版。随包字体的授权及 Zpix 的单独配置见字体说明。框架手册与开发技能同时保留在仓库并随安装包分发。
MulanPSL-2.0 View SPDX License List
Release files for pypixel-core 0.4.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
Built distribution (wheel)
Total release size: 9.0 MB
Release files / pypixel_core-0.4.1.tar.gz
Release files / pypixel_core-0.4.1-py3-none-any.whl
Security for pypixel-core 0.4.1
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.
Release history Release notifications | RSS feed
Nov 24, 2026 2 release files No provenance
"PyPI", "Python Package Index", and the blocks logos are registered trademarks of the Python Software Foundation.
© 2026 Python Software Foundation




