Skip to main content

pykardia

PyPI Python CI License

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

  • 用 Python 编写插件,通过类型注解声明配置和服务依赖。
  • 使用 YAML/JSON 管理插件,支持配置监听和运行时修改写回。
  • 为独立的插件组隔离服务,按模块变化执行热更新。
  • 加载进程、动态库和 WASM guest,也可以将 Python guest 导出为这三种产物。

开始使用

需要 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.2.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.2.0
File Size Uploaded Provenance Actions
pykardia-0.2.0.tar.gz 169.2 kB Without provenance Details for pykardia-0.2.0.tar.gz

Built distribution (wheel)

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

Total release size: 374.7 kB

Release files / pykardia-0.2.0.tar.gz

Download URL pykardia-0.2.0.tar.gz
Size 169.2 kB
Tags Source
SHA-256 checksum
How to use checksums
56939bea94d5cca497118512b1387931146556790fc5e17db55853b4487a6bf6
BLAKE2b-256 checksum
How to use checksums
37260b5fac9647b531965727b826cea30b9910623c6c6ea9dd95aaf4a2ebc50e
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.2.0-py3-none-any.whl

Download URL pykardia-0.2.0-py3-none-any.whl
Size 205.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e414b6a89b6b222cdb7fca6eb78955563aca9a4af4fce39efa3223c2b77c21fc
BLAKE2b-256 checksum
How to use checksums
203fce479e6aca51a647e03b544b960305ea1c0a5b1b9655b890047062d8b231
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.2.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