Skip to main content

UltraFlow

轻量级 LLM 应用可观测性 SDK — 调用追踪、提示词工程、批量处理。

特性

  • Prompty — 将 .prompty 文件作为无状态函数执行(同步 / 异步 / 流式)
  • Tracing — @trace 装饰器自动采集调用树,业务代码零侵入
  • 批量处理 — FlowProcessor 并发执行批量任务
  • CLI — uf init、uf new、uf run,快速上手

安装

pip install UltraFlow

快速开始

1. 初始化项目

uf init my-project
cd my-project

2. 执行 Prompty

from ultraflow import Prompty

translate = Prompty("translate.prompty")
result = translate(text="Hello, world!")

3. 添加调用追踪

from ultraflow import Prompty, configure_tracing, shutdown_tracing, trace

configure_tracing(endpoint="http://localhost:8031")

@trace(kind="flow")
def translate_flow(text: str) -> str:
    prompty = Prompty("translate.prompty")
    return prompty(text=text)

result = translate_flow(text="Hello!")
shutdown_tracing()

4. 批量处理

from ultraflow import Prompty, FlowProcessor

translate = Prompty("translate.prompty")
processor = FlowProcessor(translate, "data.json", max_workers=5)
results = processor.run()

CLI 命令

命令 说明
uf init [PROJECT] 初始化项目,生成配置和示例 prompty
uf new FLOW_NAME 创建 .prompty + .json 模板
uf run FLOW_NAME 运行流程(自动查找同名 .json)
uf run FLOW -d DATA -w N 指定数据文件和并发数
uf connection init 生成连接配置模板
uf connection list 显示当前生效的连接配置

License

MIT

Metadata

Release files for UltraFlow 1.0.1

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

Source distribution (sdist)

Source distribution for UltraFlow 1.0.1
File Size Uploaded Provenance Actions
ultraflow-1.0.1.tar.gz 20.0 kB Without provenance Details for ultraflow-1.0.1.tar.gz

Built distribution (wheel)

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

Total release size: 39.1 kB

Release files / ultraflow-1.0.1.tar.gz

Download URL ultraflow-1.0.1.tar.gz
Size 20.0 kB
Tags Source
SHA-256 checksum
How to use checksums
c48c2bbbbd8352e7dc2be9554473dde490f3c9479d1e49145a8cb47955829de6
BLAKE2b-256 checksum
How to use checksums
a0ff1d71061f666ae1c5ac5679ccf35ab20cc8fc1ac5685c6c8f3f187ff60977
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via pdm/2.26.7 CPython/3.12.11 Darwin/24.6.0

Release files / ultraflow-1.0.1-py3-none-any.whl

Download URL ultraflow-1.0.1-py3-none-any.whl
Size 19.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
5f89c1b8dfb753e819e355649760b4e2da03b5b5e7d7a3f58ca9a6bb4e9d84a0
BLAKE2b-256 checksum
How to use checksums
2b642435991e93fed80c671519043b5c46d326036558d50ee414ab3b57ca53e2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via pdm/2.26.7 CPython/3.12.11 Darwin/24.6.0

Security for UltraFlow 1.0.1

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