Skip to main content

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-friendly PyO3 binding to that engine. Import name prompting_press; distribution name prompting-press.

Install

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

Quick start

from prompting_press import Prompt
from pydantic import BaseModel

class Vars(BaseModel):
    company: str
    max_words: int

assistant = Prompt.from_yaml("""
name: assistant
role: system
body: "You are a support assistant for {{ company }}. Keep your replies under {{ max_words }} words."
variables:
  company: { type: string, trusted: true }
  max_words: { type: integer, trusted: true }
""")

result = assistant.render(Vars, data={"company": "Acme Robotics", "max_words": 50})
result.text           # "You are a support assistant for Acme Robotics. Keep your replies under 50 words."
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/.

Changelog

Per-version release notes — aggregated across every package — are in CHANGELOG.md.

License

MPL-2.0.

Download files

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

Source Distribution

prompting_press-0.5.0.tar.gz (208.6 kB view details)

Uploaded Source

Built Distributions

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

prompting_press-0.5.0-cp312-abi3-win_amd64.whl (1.2 MB view details)

Uploaded CPython 3.12+Windows x86-64

prompting_press-0.5.0-cp312-abi3-musllinux_1_2_x86_64.whl (1.7 MB view details)

Uploaded CPython 3.12+musllinux: musl 1.2+ x86-64

prompting_press-0.5.0-cp312-abi3-musllinux_1_2_aarch64.whl (1.6 MB view details)

Uploaded CPython 3.12+musllinux: musl 1.2+ ARM64

prompting_press-0.5.0-cp312-abi3-manylinux_2_28_x86_64.whl (1.5 MB view details)

Uploaded CPython 3.12+manylinux: glibc 2.28+ x86-64

prompting_press-0.5.0-cp312-abi3-manylinux_2_28_aarch64.whl (1.4 MB view details)

Uploaded CPython 3.12+manylinux: glibc 2.28+ ARM64

prompting_press-0.5.0-cp312-abi3-macosx_11_0_arm64.whl (1.3 MB view details)

Uploaded CPython 3.12+macOS 11.0+ ARM64

File details

Details for the file prompting_press-0.5.0.tar.gz.

File metadata

  • Download URL: prompting_press-0.5.0.tar.gz
  • Upload date:
  • Size: 208.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.13

File hashes

Hashes for prompting_press-0.5.0.tar.gz
Algorithm Hash digest
SHA256 019b9161a533b81d32b683d2f0bf1a8c40c8e0bbb9292430ece27c58f88fc8a0
MD5 bbb48360488f17fb1972d3759b24c088
BLAKE2b-256 a005ff166c1528c811d8dbb15e609c377f4d90f83f82b2db4b87809a315f97c1

See more details on using hashes here.

Provenance

The following attestation bundles were made for prompting_press-0.5.0.tar.gz:

Publisher: release.yml on prompting-press/prompting-press

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file prompting_press-0.5.0-cp312-abi3-win_amd64.whl.

File metadata

File hashes

Hashes for prompting_press-0.5.0-cp312-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 96683d34dc4b3ee70a3498901a2e0b9371686864d518eaada28cd99b7024a4e1
MD5 e4ccc12ba75a8de52360fff6fea6171f
BLAKE2b-256 2a09c0dac4044daa34ec36afcd3682e40cc15f5b8dd18b79afd25c3032f05532

See more details on using hashes here.

Provenance

The following attestation bundles were made for prompting_press-0.5.0-cp312-abi3-win_amd64.whl:

Publisher: release.yml on prompting-press/prompting-press

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file prompting_press-0.5.0-cp312-abi3-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for prompting_press-0.5.0-cp312-abi3-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 04c5f6f285cca03b7d8be73fc894fdf6c5c82691c2cdebc05850956142af17a3
MD5 086df7057e365255585ac5fa036a296f
BLAKE2b-256 ed4a7f1235f0b68a1c3b2bf4fae12d28175cffdbee10b0f5044416f2e0b32769

See more details on using hashes here.

Provenance

The following attestation bundles were made for prompting_press-0.5.0-cp312-abi3-musllinux_1_2_x86_64.whl:

Publisher: release.yml on prompting-press/prompting-press

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file prompting_press-0.5.0-cp312-abi3-musllinux_1_2_aarch64.whl.

File metadata

File hashes

Hashes for prompting_press-0.5.0-cp312-abi3-musllinux_1_2_aarch64.whl
Algorithm Hash digest
SHA256 819f5d8100da58d7527edb62e7c94766e7d174d5c93f776c0be5ecdc260ae284
MD5 c7f58dba2510f0e6989a81de838758dc
BLAKE2b-256 48b8615650c2df79b0d2485021b9b0771a29b5ee1f7c89206b7b762763729b6d

See more details on using hashes here.

Provenance

The following attestation bundles were made for prompting_press-0.5.0-cp312-abi3-musllinux_1_2_aarch64.whl:

Publisher: release.yml on prompting-press/prompting-press

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file prompting_press-0.5.0-cp312-abi3-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for prompting_press-0.5.0-cp312-abi3-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 b22b31f78d1b3c70062cae622496d6cb68930c743eb77cd256d909f9ec6df23c
MD5 93e55e5e01ac2d58a1aedb0c582b386b
BLAKE2b-256 8c81fdea56c5a665e892a36160cade71d0d39d3150cbb7be28f92779a59e3042

See more details on using hashes here.

Provenance

The following attestation bundles were made for prompting_press-0.5.0-cp312-abi3-manylinux_2_28_x86_64.whl:

Publisher: release.yml on prompting-press/prompting-press

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file prompting_press-0.5.0-cp312-abi3-manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for prompting_press-0.5.0-cp312-abi3-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 8bf05b8af9991db02d7ff16872f3986641e474394a1973a39747746414b3c775
MD5 22c9456e2fd88d0129cda0ec457f63cf
BLAKE2b-256 bf397e6d7dd8d248ec626f3cd387313e6fe15abcebbeec38fe36e5d9bd84fdd2

See more details on using hashes here.

Provenance

The following attestation bundles were made for prompting_press-0.5.0-cp312-abi3-manylinux_2_28_aarch64.whl:

Publisher: release.yml on prompting-press/prompting-press

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file prompting_press-0.5.0-cp312-abi3-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for prompting_press-0.5.0-cp312-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 ba12520f9aaea0bafd7e5c9bb31d0fff9d1f6b484876f817118f648071609ae0
MD5 c95550aa953762706a8bc76436ddbdc5
BLAKE2b-256 006e152dcf5657c919bee27d106117b8c827a566687e90a78b9428de89596e3b

See more details on using hashes here.

Provenance

The following attestation bundles were made for prompting_press-0.5.0-cp312-abi3-macosx_11_0_arm64.whl:

Publisher: release.yml on prompting-press/prompting-press

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

This release

0.5.0 This release

7 files

0.3.2

7 files

0.3.1

7 files

0.3.0

7 files

0.2.0

7 files

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page