Skip to main content

Python distribution of Prompting Press — a thin wrapper around the Rust core via PyO3.

Project description

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):
    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.

Project details


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.2.0.tar.gz (171.5 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.2.0-cp312-abi3-win_amd64.whl (1.1 MB view details)

Uploaded CPython 3.12+Windows x86-64

prompting_press-0.2.0-cp312-abi3-musllinux_1_2_x86_64.whl (1.6 MB view details)

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

prompting_press-0.2.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.2.0-cp312-abi3-manylinux_2_28_x86_64.whl (1.4 MB view details)

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

prompting_press-0.2.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.2.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.2.0.tar.gz.

File metadata

  • Download URL: prompting_press-0.2.0.tar.gz
  • Upload date:
  • Size: 171.5 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.2.0.tar.gz
Algorithm Hash digest
SHA256 a6169b118c913d78dbc3522f6eac0b02ac0b72c55232a2dc5035e6d74881787c
MD5 005b8cd40c1be22e0343aad933a6c551
BLAKE2b-256 786600166fc79f86c634cfa0cc6023fcb9df63e66261ae9164000f58da8cca38

See more details on using hashes here.

Provenance

The following attestation bundles were made for prompting_press-0.2.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.2.0-cp312-abi3-win_amd64.whl.

File metadata

File hashes

Hashes for prompting_press-0.2.0-cp312-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 3415cfad97cdf2ad6204deed40232823024f16a480afe3fc3fa39e1d39ba1e5b
MD5 75ac83d6c14e945232a80e0fc2912429
BLAKE2b-256 75e3fe5ed7f716f62775fe43b695d16d29f9d313146b3692fd1b832b3b86f2f2

See more details on using hashes here.

Provenance

The following attestation bundles were made for prompting_press-0.2.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.2.0-cp312-abi3-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for prompting_press-0.2.0-cp312-abi3-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 c4a1ff75a4d77f889ac31f4f9369328c8f2b67634aad532550eb7f9fd063dc73
MD5 0e51c979f85095c46d8dd224df968169
BLAKE2b-256 d8dce1455423612c74a598eb873314e29ba6235b72b9419754608e73107dd2e1

See more details on using hashes here.

Provenance

The following attestation bundles were made for prompting_press-0.2.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.2.0-cp312-abi3-musllinux_1_2_aarch64.whl.

File metadata

File hashes

Hashes for prompting_press-0.2.0-cp312-abi3-musllinux_1_2_aarch64.whl
Algorithm Hash digest
SHA256 febc05cfcb27cb7f4a10ee55c486442e703892fe7ce955b217e4c589540297ba
MD5 cbaef2cc1610807b77130c49b741d56c
BLAKE2b-256 eb967da36e1c5cdc481e8f511c8dcffe158c196c955b953b2b68b3545c93c5e2

See more details on using hashes here.

Provenance

The following attestation bundles were made for prompting_press-0.2.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.2.0-cp312-abi3-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for prompting_press-0.2.0-cp312-abi3-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 6d5d5f2bbbf6e46424c5196d449f9980b89e5402a1c8354f5effa4abf947a3bc
MD5 c366a0bcda5be6a81810d16ae64be4ba
BLAKE2b-256 43ed6394123b95955221f86804840fc9c497b4ee8b728449c22943991ef02e80

See more details on using hashes here.

Provenance

The following attestation bundles were made for prompting_press-0.2.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.2.0-cp312-abi3-manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for prompting_press-0.2.0-cp312-abi3-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 7deb62eb63d123c0af3e28cd9401609a8c544b97d5095c112efacaa33d6a096d
MD5 1487938cf41f5c615829b05cf4e82faa
BLAKE2b-256 b2b64aea0784968e00b13a92e812535408413a0ff9e0e8ee3d8e718788b3b7f6

See more details on using hashes here.

Provenance

The following attestation bundles were made for prompting_press-0.2.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.2.0-cp312-abi3-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for prompting_press-0.2.0-cp312-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 25ca96c8c513a34747e3e145597fc146d7d1aad1fe87e5555796f1705287a0bc
MD5 5a3c8fd73f9bd3b3ac872c8ce62a069c
BLAKE2b-256 ae48826cbd245a87c5701c54c1fcc50c250ce3155503c0c8dc3a3a12c6843a9e

See more details on using hashes here.

Provenance

The following attestation bundles were made for prompting_press-0.2.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.

Supported by

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