Skip to main content

UltraFlow

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

特性

  • Prompty — 将 .prompty 文件作为无状态函数执行(同步 / 异步 / 流式)
  • Tracing@trace 装饰器自动采集调用树,业务代码零侵入
  • 批量处理FlowProcessor 并发执行批量任务
  • CLIuf inituf newuf 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

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ultraflow-1.0.9.tar.gz (37.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ultraflow-1.0.9-py3-none-any.whl (29.9 kB view details)

Uploaded Python 3

File details

Details for the file ultraflow-1.0.9.tar.gz.

File metadata

  • Download URL: ultraflow-1.0.9.tar.gz
  • Upload date:
  • Size: 37.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: pdm/2.26.7 CPython/3.12.11 Darwin/24.6.0

File hashes

Hashes for ultraflow-1.0.9.tar.gz
Algorithm Hash digest
SHA256 bc8d456d835ab4fcebb5c84df24ad7041c3ab258147a95864cf6420e250f0951
MD5 9996efc0b89a9f2b46d40c1ffce8592c
BLAKE2b-256 86cdc34af33627392be730308a06f1bba3e632840bb83e9b0606a3a7dad15fd8

See more details on using hashes here.

File details

Details for the file ultraflow-1.0.9-py3-none-any.whl.

File metadata

  • Download URL: ultraflow-1.0.9-py3-none-any.whl
  • Upload date:
  • Size: 29.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: pdm/2.26.7 CPython/3.12.11 Darwin/24.6.0

File hashes

Hashes for ultraflow-1.0.9-py3-none-any.whl
Algorithm Hash digest
SHA256 0f3e06a669f77813109df54bebcaf0e83640a6bf6778cd3188ced452382ba3bc
MD5 1559d8fd31c355cc298c214edaccf2cc
BLAKE2b-256 89e04b7294c50910f895c0202fdffa85eaf57ab9fc73eac8e75eeb603001354d

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

1.0.9 This release

2 files

1.0.8

2 files

1.0.7

2 files

1.0.6

2 files

1.0.5

2 files

1.0.4

2 files

1.0.3

2 files

1.0.2

2 files

1.0.1

2 files

1.0.0

2 files

0.2.1

2 files

0.2.0

2 files

0.1.9

2 files

0.1.8

2 files

0.1.7

2 files

0.1.6

2 files

0.1.5

2 files

0.1.4

2 files

0.1.3

2 files

0.1.2

2 files

0.1.1

2 files

0.1.0

2 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