Skip to main content

pykardia

PyPI Python CI License

pykardia 是一个 Python 插件框架,用来组织可动态加载、更新和卸载的功能。 插件可以提供服务、声明依赖,并把计时器、监听器和清理动作交给框架管理。 当服务被替换或撤销时,依赖它的插件会随之重新加载或等待。

  • 用 Python 编写插件,通过类型注解声明配置和服务依赖。
  • 使用 YAML/JSON 管理插件,支持配置监听和运行时修改写回。
  • 为独立的插件组隔离服务,按模块变化执行热更新。
  • 加载进程、动态库和 WASM guest,也可以将 Python guest 导出为这三种产物。
  • 导出产物可直接在 kardia(同一模型的 Rust 实现)上运行, 两者共享同一份 kardia-guest/3 协议。

开始使用

需要 Python 3.10 或更高版本。 从 PyPI 安装:

python -m pip install pykardia

下载或克隆本仓库后,在仓库目录运行示例:

python examples/provider_consumer.py

也可以启动配置驱动的应用:

pykardia examples/pykardia.yml

它会加载示例 WASM 插件,并监听配置和插件文件。按 Ctrl-C 停止并清理资源。 python -m pykardia 与 pykardia 是等价入口;不传路径时读取 pykardia.yml。

使用文档

从 文档首页 或 快速开始 阅读:

你想做什么 文档
编写插件、提供服务、管理资源 插件与服务
使用 YAML/JSON、分组、隔离和配置写回 配置应用
使用计时器、文件监听、事件和日志 常用服务
更新正在运行的模块 热更新
编写、导出和加载独立插件 Guest 开发
查找常用类型和方法 API 参考
处理启动、依赖和运行时问题 故障排查

许可证为 GPL-3.0-only,第三方声明见 NOTICE。guest SDK(pykardia/guest/ 及其打包进 guest 的模块,文件头标有 SPDX)可任选 MIT 或 Apache-2.0,guest 可以自行选择许可证。

Metadata

Release files for pykardia 0.3.0

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

Source distribution (sdist)

Source distribution for pykardia 0.3.0
File Size Uploaded Provenance Actions
pykardia-0.3.0.tar.gz 174.0 kB Without provenance Details for pykardia-0.3.0.tar.gz

Built distribution (wheel)

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

Total release size: 384.3 kB

Release files / pykardia-0.3.0.tar.gz

Download URL pykardia-0.3.0.tar.gz
Size 174.0 kB
Tags Source
SHA-256 checksum
How to use checksums
fc08df8a2137a4f9f620617fc83643db1a3f35b0ea7b60270b226d5e3581ef56
BLAKE2b-256 checksum
How to use checksums
134065e76010202e2a6094a7fb635444d078a7ce64eff665fe52b0b3d17b1baa
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.11.18

Release files / pykardia-0.3.0-py3-none-any.whl

Download URL pykardia-0.3.0-py3-none-any.whl
Size 210.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
0a5b8192181699cc9c17a8dbb23654fb4a8cba89d4ed88ec8ab2126b71a603b2
BLAKE2b-256 checksum
How to use checksums
e085c8c3b438d5ac0c528f9ee8bae23ec8ddaccfb83b3d2a8910fe1c0859c594
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.11.18

Security for pykardia 0.3.0

Provenance

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.

No provenance found

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.

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