The modern prompt management platform for Python developers
Manage, version, and hot-reload prompts with type-safe inputs, interactive playground, and zero-deploy updates.
Experience the power of Dakora with our modern web playground. Edit, test, and preview templates in real-time.
Real-time syntax highlighting and validation
Test templates instantly with custom inputs
Works perfectly on all devices
Built with shadcn/ui components
Define inputs with strict typing: string, number, boolean, array, and object types with validation.
Organize templates in YAML files with clear structure for easy version control.
Automatic template reloading during development with built-in file watching.
Full Jinja2 support with custom filters for powerful template composition.
Built-in version management with semantic versioning support.
Optional SQLite logging of template executions for debugging.
Complete command-line interface for template management.
Production-ready with thread-safe template caching using RLock.
dakora init
Creates configuration file and example templates
id: greeting
version: 1.0.0
description: A personalized greeting template
template: |
Hello {{ name }}!
{% if age %}You are {{ age }} years old.{% endif %}
inputs:
name:
type: string
required: true
age:
type: number
required: false
from dakora import Vault
vault = Vault("dakora.yaml")
template = vault.get("greeting")
result = template.render(name="Alice", age=25)
print(result)
Perfect for building LLM-powered APIs with structured prompts and type validation.
from fastapi import FastAPI
from dakora import Vault
from openai import OpenAI
app = FastAPI()
vault = Vault("dakora.yaml")
client = OpenAI()
@app.post("/chat")
async def chat_endpoint(
message: str,
template_id: str
):
template = vault.get(template_id)
# Define completion function
def get_completion(prompt):
response = client.chat.completions.create(
model="gpt-4",
messages=[{
"role": "user",
"content": prompt
}]
)
return response.choices[0].message.content
result = template.run(
get_completion,
message=message
)
return {"response": result}
Hot-reload templates during development for rapid iteration and testing.
from dakora import Vault
from dakora.watcher import Watcher
vault = Vault("dakora.yaml")
# Setup file watcher
watcher = Watcher(
"./prompts",
on_change=vault.invalidate_cache
)
watcher.start()
# Templates reload automatically
template = vault.get("my_template")
result = template.render(
input_text="Hello world"
)
Manage templates, versions, and development workflow from the command line.
# List all templates
dakora list
# Get template content
dakora get summarizer
# Bump version
dakora bump summarizer --minor
# Watch for changes
dakora watch