bedrockflow
CI for Bedrock outputs — composable gates, correct retries, offline fixtures.
MIT License. See LICENSE.
Install
# Offline eval panels and fixture CI (no AWS credentials)
pip install bedrockflow
# Live Bedrock Converse retry loops
pip install "bedrockflow[aws]"
Python 3.11+.
Quick start (offline)
Works with the base install — no boto3 required:
from bedrockflow import Context, markdown_sections, run_panel
from bedrockflow.evals.offline import eval_text
from bedrockflow.evals.verdict import EvalVerdict
evals = markdown_sections("## Summary", "## Risks", max_words=300)
verdict, reasons = eval_text("## Summary\n...\n\n## Risks\n...", evals)
assert verdict is EvalVerdict.OK
bedrockflow eval tests/fixtures/simple/good.md \
--panel bedrockflow.examples.simple_evals:SIMPLE_EVALS
--panelloads arbitrary Python (module.path:ATTRIBUTE). Only point it at modules you trust.
Quick start (Bedrock)
Requires pip install "bedrockflow[aws]" and configured AWS credentials:
from bedrockflow import Context, converse_with_evals, markdown_sections
out = converse_with_evals(
"us.anthropic.claude-sonnet-4-6",
initial="Summarize tail risk in vol selling.",
evals=markdown_sections("## Summary", "## Risks", max_words=300),
ctx=Context(),
max_tokens=512,
)
print(out.trace) # per-turn named eval failures + tokens
See docs/COOKBOOK.md for JSON gates, tables, model compare, prompt caching.
CLI
# Offline fixture CI (no AWS)
bedrockflow eval tests/fixtures/simple/ --panel bedrockflow.examples.simple_evals:SIMPLE_EVALS
bedrockflow eval draft.md --only structure --json
# Live Bedrock (requires [aws])
bedrockflow run --example simple
bedrockflow run --example trade_memo --record drafts/latest.md --trace runs/latest.json
bedrockflow run --example trade_memo --cache-initial
# Model A/B on the same panel
bedrockflow compare us.anthropic.claude-sonnet-4-6 us.amazon.nova-pro-v1:0 --example simple
# Security scanning
bedrockflow trivy
bedrockflow trivy --docker
bedrockflow bandit
Demo eval panels live under bedrockflow.examples (trade memo, simple summary). They ship for reference but are not required for library use.
Starter panels
from bedrockflow import markdown_sections, json_object, no_preamble, csv_table
Progress output (opt-in)
Retry progress bars and last-draft stderr dumps are off by default:
export BEDROCKFLOW_VISIBLE_TURNS=1
export BEDROCKFLOW_PRINT_LAST_DRAFT=1
Trace artifacts
bedrockflow run --trace runs/latest.json writes turns, named eval steps, token totals (including cache read/write).
CI
Fixture eval runs on every PR — see .github/workflows/ci.yml.
uv run pytest
uv run black --check .
PyPI
See docs/LAUNCH.md and CHANGELOG.md.
Releases publish via GitHub Actions on version tags (trusted publishing — no tokens in secrets):
git tag -a v0.3.0 -m "Release v0.3.0"
git push origin v0.3.0
Metadata
Release files for bedrockflow 0.3.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| bedrockflow-0.3.0.tar.gz | 22.6 kB | Without provenance | Details for bedrockflow-0.3.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| bedrockflow-0.3.0-py3-none-any.whl | Python 3 | none | any | Details for bedrockflow-0.3.0-py3-none-any.whl |
Total release size: 58.3 kB
Release files / bedrockflow-0.3.0.tar.gz
| Download URL | bedrockflow-0.3.0.tar.gz |
|---|---|
| Size | 22.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
13c630b92c455c94190978a2aa1fb16c694650ad8d368d923be4a39dbc1e7b69
|
|
BLAKE2b-256 checksum How to use checksums |
5c1f45e5aa6cf4a6371eb6ffd9466eefdd957869ff6aa2ef88346e7deba1f2c1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.11.26 {"installer":{"name":"uv","version":"0.11.26","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}
|
Release files / bedrockflow-0.3.0-py3-none-any.whl
| Download URL | bedrockflow-0.3.0-py3-none-any.whl |
|---|---|
| Size | 35.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
db325deb8239362365b7e1e11dc150fe3d4caa0213a14d1be036dafa063203e0
|
|
BLAKE2b-256 checksum How to use checksums |
4e62a20f001322e5ba3a3ae6540a5e5497caf48c1d0ea854fd1bc43fc3ca08ba
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.11.26 {"installer":{"name":"uv","version":"0.11.26","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}
|
Security for bedrockflow 0.3.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.