Skip to main content

gherkai-core

gherkai 的执行核心库:把 .feature 解析成领域模型、按 tag 分组成可并发的 job、并发调度、汇总成四层(run / job / scenario / step)结构化结果。它是 gherkai 命令行与 gherkai-runtime 依赖的库,一般不直接安装——要运行测试请装命令行包 gherkai。把这套执行模型嵌进自己的程序(Web 界面、调度服务、CI 插件)时才直接用它。

安装

uv add gherkai-core            # 或 pip install gherkai-core;需 Python ≥ 3.13
uv add 'gherkai-core[aws]'     # 用 DynamoDB / S3 存储实现时加装(补 boto3 依赖);只用本地文件存储时不必装

最小用法

from gherkai_core.model import RunMeta
from gherkai_core.schedule import schedule
from gherkai_core.scope import FeatureSource, PlanConfig, plan

# ① 分组:一组 .feature 文本 → 可并发的 job 列表(core 不读文件,路径与内容由你给)
jobs = plan([FeatureSource(uri="features/checkout.feature", text=feature_text)],
            PlanConfig(default_engine="novaact"))

# ② 执行:run 身份由你生成,引擎与事件回调由你注入
run_meta = RunMeta(run_id=run_id, created_at=created_at, jobs=tuple(jobs))
result = schedule(run_meta, engine_resolver, event_sink)

最常用的模块(完整清单见包内各模块的 docstring):

模块 提供什么
gherkai_core.scope plan(features, config):按 tag 分组成 job、校验冲突
gherkai_core.schedule schedule(...):并发执行完一个 run 的全部 job,带并发上限、失败隔离、超时、优雅停
gherkai_core.model RunMeta / RunResult / Status 等判定与结果类型
gherkai_core.ports 引擎、存储、进度回调的接口,由你注入实现
gherkai_core.adapters 本机子进程引擎、Fargate 引擎、文件与 DynamoDB + S3 存储等现成实现
gherkai_core.persist / gherkai_core.project / gherkai_core.reconcile 随进度实时落库、从事件归约出 run 状态,以及幂等推进一次 run(自建后台或无状态批量运行要用)
gherkai_core.errors 计划期与执行期的异常类型

引擎与存储按 gherkai_core.ports 里的接口注入。不想自己接线就用 https://pypi.org/project/gherkai-runtime/ ,它把引擎与存储组装好了。

文档

项目主页与问题反馈:https://github.com/zhiyanliu/gherkai#readme

Metadata

Release files for gherkai-core 1.4.7

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

Source distribution (sdist)

Source distribution for gherkai-core 1.4.7
File Size Uploaded
gherkai_core-1.4.7.tar.gz 112.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for gherkai-core 1.4.7
File Interpreter ABI Platform
gherkai_core-1.4.7-py3-none-any.whl Python 3 none any Details

Total release size: 250.3 kB

Release files / gherkai_core-1.4.7.tar.gz

Download URL gherkai_core-1.4.7.tar.gz
Size 112.1 kB
Tags Source
SHA-256 checksum
How to use checksums
09ed5ae2c359a656aac5db990a6931ed904dce5ef47a49b26c9fc9ecff36f764
BLAKE2b-256 checksum
How to use checksums
f6221e6450d7af34644b23480d36329bd32c24368d5d25d13fea89a18526735b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.12.3 {"installer":{"name":"uv","version":"0.12.3","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 30, 2026.

Transparency log

Release files / gherkai_core-1.4.7-py3-none-any.whl

Download URL gherkai_core-1.4.7-py3-none-any.whl
Size 138.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e301684ce59358d375d4a93162603e3dd6cfa69f8d4dfdba761df5eb9707de10
BLAKE2b-256 checksum
How to use checksums
4163c832772ff24621c2ba365038b6cbd3f35c14e18aa6ac6381177c3c84a29c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.12.3 {"installer":{"name":"uv","version":"0.12.3","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 30, 2026.

Transparency log

Release history Release notifications | RSS feed

1.4.9

2 release files

1.4.8

2 release files

This release

1.4.7 This release

2 release files

1.4.6

2 release files

1.4.5

2 release files

1.4.4

2 release files

1.4.3

2 release files

1.4.2

2 release files

1.4.1

2 release files

1.4.0

2 release files

0.0.0

2 release files

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