Metadata-Version: 2.4
Name: prompting-press
Version: 0.2.0
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Rust
Classifier: Topic :: Software Development :: Libraries
Classifier: Topic :: Text Processing :: General
Classifier: Typing :: Typed
Requires-Dist: pydantic>=2,<3
License-File: LICENSE
License-File: NOTICE
Summary: Python distribution of Prompting Press — a thin wrapper around the Rust core via PyO3.
Keywords: prompt,prompting,prompt-template,prompt-engineering,llm,genai,ai,template,pydantic,typed
Home-Page: https://prompting-press.github.io/
Author: Sjors Robroek
License: Apache-2.0
Requires-Python: >=3.12
Description-Content-Type: text/markdown; charset=UTF-8; variant=GFM
Project-URL: Documentation, https://prompting-press.github.io/
Project-URL: Homepage, https://prompting-press.github.io/
Project-URL: Issues, https://github.com/prompting-press/prompting-press/issues
Project-URL: Repository, https://github.com/prompting-press/prompting-press

# prompting-press

A typed, variant-aware **prompt-template library**. It turns typed inputs and a template into
rendered text plus content-addressed provenance — nothing else (no I/O, no LLM calls, no request
assembly). Rust, Python, and TypeScript all bind one compiled Rust engine, so rendered output is
byte-identical across every language.

This is the Python distribution: a [Pydantic](https://docs.pydantic.dev)-friendly
[PyO3](https://pyo3.rs) binding to that engine. Import name `prompting_press`; distribution name
`prompting-press`.

## Install

```bash
pip install prompting-press
uv add prompting-press          # in a uv project
uv pip install prompting-press  # uv's pip interface
```

## Quick start

```python
from prompting_press import Prompt
from pydantic import BaseModel

class Vars(BaseModel):
    name: str

greet = Prompt.from_yaml("""
name: greet
role: user
body: "Hi {{ name }}"
variables:
  name: { type: string, trusted: true }
""")

result = greet.render(Vars, data={"name": "Ada"})
result.text           # "Hi Ada"
result.template_hash  # 64-char SHA-256 of the template source
result.render_hash    # 64-char SHA-256 of the rendered output
```

## Documentation

Full docs — getting started, API reference, template features, guides, and the CI agreement
lint — are at **<https://prompting-press.github.io/>**.

## License

[Apache-2.0](https://github.com/prompting-press/prompting-press/blob/main/LICENSE).

