PromptKit

Getting Started

  • Installation
    • Requirements
    • Install from PyPI
    • Development Installation
    • Verify Installation
    • Optional Dependencies
      • OpenAI
      • Ollama
    • Next Steps
  • Quick Start Guide
    • Prerequisites
    • Your First Prompt
      • 1. Create a Prompt File
      • 2. Use in Python
      • 3. Use the CLI
    • Key Concepts
      • YAML Structure
      • Template Variables
      • Input Validation
    • Next Steps
    • Common Patterns
      • Environment Variables
      • Multiple Engines
      • Batch Processing
  • Creating Your First Prompt
    • What We’ll Build
    • Step 1: Design the Prompt
    • Step 2: Create the YAML File
    • Step 3: Test the Prompt
      • Using Python
      • Using the CLI
    • Step 4: Advanced Features
      • Template Rendering Only
      • Validation and Debugging
    • Step 5: Iteration and Improvement
      • Version 2: Enhanced Prompt
    • Best Practices
      • 1. Clear Input Schema
      • 2. Default Values
      • 3. Conditional Logic
      • 4. Error Handling
    • Common Patterns
      • Multi-step Workflows
      • Dynamic Prompt Selection
    • Next Steps

Tutorials

  • Advanced Template Techniques
    • Overview
    • Conditional Logic
    • Loops and Iteration
    • Template Filters
    • Template Inheritance
      • Base Template (base_prompt.yaml)
      • Child Template (specialized_prompt.yaml)
    • Macros for Reusability
    • Error Handling in Templates
    • Custom Template Functions
    • Best Practices
    • Performance Considerations
    • Common Patterns
      • Multi-language Support
      • Dynamic Validation
  • Input Validation and Schema Management
    • Overview
    • Basic Validation
      • Simple Types
      • Optional Fields
    • Advanced Type Validation
      • Enum Validation
      • Numeric Constraints
      • String Constraints
    • Complex Object Validation
      • Nested Objects
      • Array Validation
    • Date and Time Validation
    • Custom Validators
      • Using Pydantic Models in Python
    • Conditional Validation
      • Schema Variants
    • Validation Error Handling
      • Custom Error Messages
      • Validation in Templates
    • Schema Composition and Reuse
      • Shared Schema Components
    • Testing Validation
      • Unit Tests for Schemas
    • Best Practices
    • Common Validation Patterns
      • File Upload Validation
      • API Configuration Validation

Examples

  • Basic Examples
    • Simple Text Generation
      • Basic Greeting
      • Email Generator
    • Content Creation
      • Blog Post Outline
      • Product Description
    • Question Answering
      • FAQ Response
    • Data Processing
      • Report Summary
    • Educational Content
      • Study Guide
    • CLI Usage Examples
      • Running Basic Examples
      • Interactive Mode
      • Cost Estimation
    • Python Integration Examples
      • Batch Processing
      • Error Handling
    • Next Steps
  • Advanced Examples
    • Overview
    • Multi-Step Workflow System
      • Sequential Processing Pipeline
      • Workflow Controller
    • Content Generation System
      • Dynamic Content Templates
    • AI Assistant Integration
      • Context-Aware Assistant
    • Testing and Quality Assurance
      • Automated Testing Framework
    • Production Deployment
      • Configuration Management

API Reference

  • Core API Reference
    • promptkit.core.prompt
      • Prompt Class
    • promptkit.core.loader
      • Functions
      • PromptRegistry Class
    • promptkit.core.runner
      • Functions
      • PromptRunner Class
    • promptkit.core.template
      • TemplateRenderer Class
    • promptkit.core.validation
      • Validator Class
      • Functions
    • promptkit.core.exceptions
      • Custom Exceptions
    • promptkit.core.utils
      • Utility Functions
    • Type Definitions
  • Engines API Reference
    • Base Engine
      • BaseEngine Class
    • OpenAI Engine
      • OpenAIEngine Class
    • Azure OpenAI Engine
      • AzureOpenAIEngine Class
    • Anthropic Engine
      • AnthropicEngine Class
    • Local Engine
      • LocalEngine Class
    • HuggingFace Engine
      • HuggingFaceEngine Class
    • Mock Engine
      • MockEngine Class
    • Engine Factory
      • EngineFactory Class
    • Engine Configuration
      • Configuration Examples
    • Engine Utilities
      • Utility Functions
  • CLI API Reference
    • Overview
    • Installation and Setup
      • Environment Configuration
    • Main Command: promptkit
      • Global Options
    • Core Commands
      • run - Execute Prompts
      • list - List Available Prompts
      • validate - Validate Prompts
      • create - Create New Prompts
      • edit - Edit Prompts
      • test - Test Prompts
      • init - Initialize Project
    • Engine Management
      • engine - Engine Operations
    • Batch Operations
      • batch - Batch Processing
      • Batch Configuration File
    • Development Commands
      • dev - Development Tools
      • export - Export Prompts
    • Configuration Management
      • config - Configuration Operations
      • Configuration File Format
    • Shell Integration
      • Shell Completion
      • Aliases and Functions
    • Output Formats
      • JSON Output
      • YAML Output
    • Error Handling
      • Exit Codes
      • Common Error Messages
    • Advanced Usage
      • Pipeline Integration
      • Custom Scripts

Advanced Topics

  • Core Concepts
    • Overview
    • Key Components
      • 1. Prompts
      • 2. Engines
      • 3. Runners
      • 4. Loaders
    • Architecture Patterns
      • Separation of Concerns
      • Template-First Design
      • Type Safety
    • Workflow Patterns
      • 1. Simple Execution
      • 2. Template Preview
      • 3. Batch Processing
      • 4. Pipeline Composition
    • Input Validation
      • Basic Types
      • Optional Types
      • Complex Types
      • Custom Validation
    • Template Engine (Jinja2)
      • Variables
      • Conditionals
      • Loops
      • Filters
      • Default Values
    • Error Handling
      • Validation Errors
      • Template Errors
      • Engine Errors
    • Best Practices
      • 1. Organize Prompts by Domain
      • 2. Use Clear Naming
      • 3. Design for Reusability
      • 4. Version Your Prompts
      • 5. Test Thoroughly
    • Performance Considerations
      • Template Compilation
      • Engine Reuse
      • Caching
PromptKit
  • Search


© Copyright 2025, Olger Chotza.

Built with Sphinx using a theme provided by Read the Docs.