Skip to main content

A flexible system prompt creator with version control and validation

Project description

PromptEngine

A flexible and powerful system prompt creator with built-in version control and validation capabilities. Perfect for managing AI prompts across multiple applications.

Features

  • Template System: Use Jinja2 templates with variable substitution
  • Version Control: Track changes, view diffs, and rollback to previous versions
  • Validation & Testing: Validate prompts and test outputs
  • Easy Integration: Simple SDK that can be integrated into any Python application
  • Storage Formats: Support for JSON and YAML
  • Metadata Management: Track creation time, authors, tags, and more

Installation

pip install -e .

For development:

pip install -e ".[dev]"

Quick Start

from promptengine import PromptTemplate, PromptRegistry, VersionControl

# Create a prompt template
template = PromptTemplate(
    name="code_reviewer",
    template="""You are a {{expertise_level}} code reviewer.
Review the following {{language}} code and provide feedback on:
- Code quality
- Best practices
- Potential bugs

Code:
{{code}}
""",
    variables=["expertise_level", "language", "code"]
)

# Render with variables
prompt = template.render(
    expertise_level="senior",
    language="Python",
    code="def hello(): print('world')"
)

# Use version control
vc = VersionControl()
version_id = vc.save_version(prompt)

# Create a registry
registry = PromptRegistry()
registry.add(template)
registry.save("prompts.json")

Documentation

See the examples/ directory for more usage examples.

License

MIT

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

sysprompt_engine-0.1.0.tar.gz (36.7 kB view details)

Uploaded Source

Built Distribution

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

sysprompt_engine-0.1.0-py3-none-any.whl (14.4 kB view details)

Uploaded Python 3

File details

Details for the file sysprompt_engine-0.1.0.tar.gz.

File metadata

  • Download URL: sysprompt_engine-0.1.0.tar.gz
  • Upload date:
  • Size: 36.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.5

File hashes

Hashes for sysprompt_engine-0.1.0.tar.gz
Algorithm Hash digest
SHA256 4587a2440754dcee52ef702a56f2d8fe6910a7287659e7a10b6024eecd3d014b
MD5 f092c57080c04ff2dddd1fda64a0baef
BLAKE2b-256 9230b44d8f3276dd298cfaa54bd4b636dca4be4b9e4641768e1806e97701293e

See more details on using hashes here.

File details

Details for the file sysprompt_engine-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for sysprompt_engine-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 a42fb0b1ba6a78b2e49e22505e327f7e4e1a0193198fff593f9149ea8ffd30b8
MD5 caf36451df39998ed57ecde1249f9811
BLAKE2b-256 454b4966d5e7987380fb5b8e1c7b12e357d9f2a1d57e55ce5139abd4052cd065

See more details on using hashes here.

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