prompt-registry
A versioned prompt library with evals for Python teams.
prompt-registry helps you store prompts as versioned artifacts, load them from disk, compare revisions, render them with variables, and run lightweight evaluations against expected behaviors.
It is designed for teams who want a simple, inspectable workflow for prompt development without depending on a database or a hosted prompt platform.
Features
- Versioned prompt files in YAML.
- Prompt metadata, tags, owners, and changelogs.
- Variable validation for required inputs.
- Prompt rendering with safe placeholder checking.
- Registry loader for folders of prompts.
- Semantic prompt references like
support/refund_request@1.2.0. - Evals with exact, contains, regex, and callable checks.
- Snapshot-style regression testing for prompt outputs.
- Simple CLI for listing, showing, diffing, and evaluating prompts.
- Pure Python project with low friction local adoption.
Install
pip install -e .
Quick start
Create a prompt file:
id: support/refund_request
version: 1.0.0
name: Refund Request Triage
owners:
- Brandon Himpfen
summary: Triage a customer refund request and decide next action.
variables:
customer_name:
description: Customer full name
required: true
order_id:
description: Order identifier
required: true
message:
description: Customer message body
required: true
prompt:
system: |
You are a careful support operations assistant.
Review the refund request and recommend the next step.
user: |
Customer: {customer_name}
Order ID: {order_id}
Message: {message}
changelog:
- version: 1.0.0
date: 2026-03-31
notes: Initial prompt.
Load and render it:
from prompt_registry import PromptRegistry
registry = PromptRegistry.from_path("prompts")
prompt = registry.get("support/refund_request@1.0.0")
rendered = prompt.render(
customer_name="Taylor Smith",
order_id="ORD-1042",
message="My package arrived damaged and I want a refund.",
)
print(rendered.system)
print(rendered.user)
Run evals:
python -m prompt_registry.cli eval --prompts prompts --evals examples/evals/support_refund_request.yaml
Prompt file format
Each prompt is a YAML file with this basic structure:
id: namespace/name
version: 1.0.0
name: Human readable name
owners:
- Team or owner
summary: One-line summary
variables:
variable_name:
description: What this value means
required: true
prompt:
system: |
System prompt text with {variables}
user: |
User prompt text with {variables}
metadata:
model_family: gpt
risk_level: low
use_case: support
changelog:
- version: 1.0.0
date: 2026-03-31
notes: Initial release.
Evals format
Evals are YAML files with named test cases:
prompt: support/refund_request@1.0.0
cases:
- id: asks_for_decision
input:
customer_name: Taylor Smith
order_id: ORD-1042
message: My package arrived damaged and I want a refund.
assertions:
- type: contains
target: user
value: Taylor Smith
- type: contains
target: user
value: ORD-1042
CLI
List prompts:
python -m prompt_registry.cli list --prompts prompts
Show a prompt:
python -m prompt_registry.cli show --prompts prompts --ref support/refund_request@1.0.0
Diff two prompt versions:
python -m prompt_registry.cli diff --prompts prompts \
--left support/refund_request@1.0.0 \
--right support/refund_request@1.1.0
Evaluate prompt cases:
python -m prompt_registry.cli eval --prompts prompts --evals examples/evals/support_refund_request.yaml
Project structure
prompt-registry/
├── docs/
├── examples/
├── prompts/
├── src/prompt_registry/
├── tests/
├── pyproject.toml
└── README.md
Why this repo exists
This project is useful when you want prompt engineering to behave more like software engineering:
- prompts live in version control.
- revisions are explicit.
- diffs are readable.
- tests are repeatable.
- teams can review prompt changes before shipping them.
License
MIT
Metadata
Release files for promptartifact 0.1.2
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 | |
|---|---|---|---|---|
| promptartifact-0.1.2.tar.gz | 11.1 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| promptartifact-0.1.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 21.7 kB
Release files / promptartifact-0.1.2.tar.gz
| Download URL | promptartifact-0.1.2.tar.gz |
|---|---|
| Size | 11.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
fd0b58945b5cbc310e55d192a243b098a3bcdf4e209e451dc8535ffb7836521a
|
|
BLAKE2b-256 checksum How to use checksums |
028f92f7413d4d1840fe89e7629e98c8265dd4a021194c7574444d8516d16976
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.5
|
Release files / promptartifact-0.1.2-py3-none-any.whl
| Download URL | promptartifact-0.1.2-py3-none-any.whl |
|---|---|
| Size | 10.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
62dbbf3a9ba1936d4a410ddb4f203cf5113c90702bbb2f61f3fa4435e0c57740
|
|
BLAKE2b-256 checksum How to use checksums |
b3e8f30f5eea733cc13cbe7f0fc2a4b97a5de42219f40936ea312f39589353b3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.5
|
Security for promptartifact 0.1.2
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.