Skip to main content

PromptVault is a tiny, zero‑dependency helper class for keeping reusable prompt templates in memory and filling them with runtime values.

Project description

PromptVault

PromptVault is a tiny, zero‑dependency helper class for keeping reusable prompt templates in memory and filling them with runtime values. Templates use double‑braces ({{variable}}) to mark the parts that should be replaced.


Installation

pip install promptvault        

Quick‑start

from promptvault import PromptVault 

pv = PromptVault()

1. Add a template

pv.add({
    "name": "blog-post-generator",
    "prompt": (
        "Write a detailed blog post about {{topic}}, aimed at {{audience}}, "
        "in a {{tone}} tone."
    )
})

2. Inspect the raw template (no inputs)

pv.get("blog-post-generator")

Output:

{
    'name': 'blog-post-generator',
    'prompt': 'Write a detailed blog post about {{topic}}, aimed at {{audience}}, in a {{tone}} tone.',
    'variables': ['topic', 'audience', 'tone']
}

3. Fill the template with data

filled = pv.get(
    name="blog-post-generator",
    inputs={
        "topic": "AI in Healthcare",
        "audience": "health‑care professionals",
        "tone": "professional"
    }
)

Output:

{
    'name': 'blog-post-generator',
    'prompt': 'Write a detailed blog post about AI in Healthcare, aimed at health‑care professionals, in a professional tone.',
    'variables': ['topic', 'audience', 'tone']
}

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

promptvault-0.0.4.tar.gz (1.6 kB view details)

Uploaded Source

Built Distribution

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

promptvault-0.0.4-py3-none-any.whl (2.1 kB view details)

Uploaded Python 3

File details

Details for the file promptvault-0.0.4.tar.gz.

File metadata

  • Download URL: promptvault-0.0.4.tar.gz
  • Upload date:
  • Size: 1.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.8

File hashes

Hashes for promptvault-0.0.4.tar.gz
Algorithm Hash digest
SHA256 dc67b8e85cc5ff638fa2dc7c6b8263c6edb6447ea31682a4a323cfe7f9e934c3
MD5 bb8d6b2e043fd178d9714f6abf7f14ee
BLAKE2b-256 793f504f1dd4ef18f2b141b0b4d856dc20ba5e9eecacae74b712b92f711edc04

See more details on using hashes here.

Provenance

The following attestation bundles were made for promptvault-0.0.4.tar.gz:

Publisher: workflow.yaml on s1129092/promptvault

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

File details

Details for the file promptvault-0.0.4-py3-none-any.whl.

File metadata

  • Download URL: promptvault-0.0.4-py3-none-any.whl
  • Upload date:
  • Size: 2.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.8

File hashes

Hashes for promptvault-0.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 f488f7676fedc0c575941d7506f3a2885fc49da4efbc480ce9cf5d3ab53f7961
MD5 1ee395624f283f2d687122fc5d411598
BLAKE2b-256 32b2ac1b129bd17479416a9536842f777d3a3cf77009a3d228cf2d82353e4280

See more details on using hashes here.

Provenance

The following attestation bundles were made for promptvault-0.0.4-py3-none-any.whl:

Publisher: workflow.yaml on s1129092/promptvault

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