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.3.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.3-py3-none-any.whl (2.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: promptvault-0.0.3.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.3.tar.gz
Algorithm Hash digest
SHA256 a716d18bc993736e9be2d80e173244bf3d86f8cc7f0067eb64f2d1defddcc914
MD5 8ee187b1eeacecc0dd46468eda1e4ae2
BLAKE2b-256 12c774a28e8ef9157fafeb32deb9864abc48059aa132460bce6dac55315044aa

See more details on using hashes here.

Provenance

The following attestation bundles were made for promptvault-0.0.3.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.3-py3-none-any.whl.

File metadata

  • Download URL: promptvault-0.0.3-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.3-py3-none-any.whl
Algorithm Hash digest
SHA256 91a8834ae8c4458d14b59523a2fc3c5b2c3a2b638a04b23beb9be7bc418d6618
MD5 f93fdd9ec1b9eee567e2237d26df1136
BLAKE2b-256 87b98dcb3a9f585889b2a02162e70c12de5d2b168b0871d860454840bf52bc58

See more details on using hashes here.

Provenance

The following attestation bundles were made for promptvault-0.0.3-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