Add your description here
Project description
Perago
Perago 是一个面向 Conductor worker 的 typed Python 运行时层,用来在版本化 workspace 上执行任务。它把任务函数签名、Pydantic 输入输出契约、Conductor TaskDef、LakeFS workspace 下载与发布、guardrail 校验和 worker 启动边界收敛到同一套模型里。
README.md 只保留项目概览、安装和最小入口;完整说明以文档站为准。
安装
要求 Python 3.10 或更新版本。
uv add perago
或:
pip install perago
仓库本地开发使用:
uv sync
最小示例
下面是一个最小的 workspace task。任务作者只需要声明 typed params/output、workspace 约束和任务元数据;Perago 负责校验、TaskDef 提取和运行时集成。
from pathlib import Path
from pydantic import BaseModel, Field
from perago import WorkspaceSpec, require_glob, task
class BuildFeaturesParams(BaseModel):
feature_set: str
min_rows: int = Field(ge=1)
class BuildFeaturesOutput(BaseModel):
row_count: int = Field(ge=0)
feature_count: int = Field(ge=0)
@task(
name="features.build",
owner_email="data@example.com",
workspace=WorkspaceSpec(
prefix="/",
pre=[require_glob("raw/**/*.parquet", min_count=1)],
),
)
def build_features(
workspace: Path,
params: BuildFeaturesParams,
) -> BuildFeaturesOutput:
return BuildFeaturesOutput(row_count=100, feature_count=24)
workspace-free task 使用同一套 decorator 和 typed contract,但不声明 workspace: Path,也不声明 WorkspaceSpec。
快速入口
perago CLI 的 MVP 入口是单任务 module target:
perago check app.workers.features_build
perago extract app.workers.features_build --output generated/features.build.json
perago start app.workers.features_build -j 4
perago check:导入模块并校验任务声明与本地 runtime config。perago extract:生成带嵌入 schema 的 Conductor TaskDef JSON。perago start:在真实 Conductor 和 LakeFS 配置下启动 supervisor-managed worker processes。
文档
- 文档首页:https://perago.readthedocs.io/zh-cn/latest/
- Getting Started:https://perago.readthedocs.io/zh-cn/latest/getting-started.html
- Task Authoring:https://perago.readthedocs.io/zh-cn/latest/task-authoring/
- Runtime:https://perago.readthedocs.io/zh-cn/latest/runtime/
- API Reference:https://perago.readthedocs.io/zh-cn/latest/api/
- Architecture:https://perago.readthedocs.io/zh-cn/latest/architecture/
仓库内的对应内容可从这里继续展开:
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file perago-0.2.0.tar.gz.
File metadata
- Download URL: perago-0.2.0.tar.gz
- Upload date:
- Size: 78.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
532dbc771a615080a59750bd97462c352d4ae210068e5c57b232c562e66fa2cd
|
|
| MD5 |
415df9d53a4be09a8d9ae312806e1dd3
|
|
| BLAKE2b-256 |
99d4baa5765103c953751c4e28bcdc609008c97ce1a438295ef76744ad6af6f2
|
Provenance
The following attestation bundles were made for perago-0.2.0.tar.gz:
Publisher:
publish.yml on Qiyin-Tech/perago
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
perago-0.2.0.tar.gz -
Subject digest:
532dbc771a615080a59750bd97462c352d4ae210068e5c57b232c562e66fa2cd - Sigstore transparency entry: 1585418647
- Sigstore integration time:
-
Permalink:
Qiyin-Tech/perago@c57a2b2e3ce77f31b71216b3d6eeb461f7b744da -
Branch / Tag:
refs/tags/v0.2.0 - Owner: https://github.com/Qiyin-Tech
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@c57a2b2e3ce77f31b71216b3d6eeb461f7b744da -
Trigger Event:
release
-
Statement type:
File details
Details for the file perago-0.2.0-py3-none-any.whl.
File metadata
- Download URL: perago-0.2.0-py3-none-any.whl
- Upload date:
- Size: 61.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
19627436915aa919abb0e1876facf885b0a1e43d2befeb99ba68eb05ce047600
|
|
| MD5 |
59a8dad5852a762a187db10183374f5d
|
|
| BLAKE2b-256 |
c41fe143123221ebd72eae3cf06cdca4a86e8bb9fe997803d7bfda6691b01d22
|
Provenance
The following attestation bundles were made for perago-0.2.0-py3-none-any.whl:
Publisher:
publish.yml on Qiyin-Tech/perago
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
perago-0.2.0-py3-none-any.whl -
Subject digest:
19627436915aa919abb0e1876facf885b0a1e43d2befeb99ba68eb05ce047600 - Sigstore transparency entry: 1585418734
- Sigstore integration time:
-
Permalink:
Qiyin-Tech/perago@c57a2b2e3ce77f31b71216b3d6eeb461f7b744da -
Branch / Tag:
refs/tags/v0.2.0 - Owner: https://github.com/Qiyin-Tech
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@c57a2b2e3ce77f31b71216b3d6eeb461f7b744da -
Trigger Event:
release
-
Statement type: