skillfed

banks

A prompt programming language

banks v2.5.0 8.4M downloads/30d#1,631 on PyPI128
Permissive license MIT Active released

What it is and what it does

Banks is a template-based prompt programming language built on Jinja2 that transforms generic prompt blueprints into structured LLM inputs. Rather than manually formatting prompts with f-strings or string concatenation, you write templates using custom tags like `{% chat %}` to define message roles and content, then render them with context variables. The system handles conversion to chat message objects, image embedding for vision models, and metadata attachment for prompt versioning and management.

The package integrates with LLM providers through optional dependencies: it can invoke LLMs during template rendering to generate few-shot examples or perform function calling, supports prompt caching directives from providers like Anthropic, and stores prompts on disk with version tracking. Core templating requires only the base dependencies (Jinja2, Pydantic, Griffe for documentation), while advanced features like in-prompt LLM completion or Redis-backed caching require optional packages.

Use it for:

  • Build reusable chat prompt templates with system/user/assistant roles and render them as structured message objects for API calls.
  • Include images in prompts for vision models and have Banks handle URL encoding or local file upload during rendering.
  • Generate few-shot examples by invoking an LLM during template rendering to populate example sections dynamically.
  • Define and version prompts with metadata, storing them on disk for team reuse and tracking changes across iterations.
  • Attach function definitions to prompts and let Banks orchestrate LLM tool-calling roundtrips automatically.
  • Mark sections of prompts for provider-specific caching (e.g., Anthropic's ephemeral cache) to reduce latency and cost.

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

Banks is a template language and prompt management system for generating LLM prompts from blueprints, supporting chat message formatting, image inclusion, dynamic text generation via LLM calls, function calling, and prompt caching.

Yes. Banks is actively maintained, has low install friction, carries a permissive MIT license, and solves a real problem—moving beyond ad-hoc string formatting for LLM prompts. The Beta status and recent release (6 days old) suggest active development. Install it if you're building LLM applications and want structured, versioned, reusable prompts; skip it if you're only calling LLMs with simple one-off strings.

Install

banks on PyPI

pip

pip install banks

uv

uv add banks

poetry

poetry add banks

Installing banks

Before you install

Low friction install with a pure-Python wheel. Maintenance is active with a recent release (6 days old) and steady repository activity. Seven runtime dependencies are all well-established packages, though optional dependencies (litellm, redis) add capability for advanced features.

License in practice

MIT license permits unrestricted use, modification, and distribution in both open-source and commercial projects with minimal restrictions.

Quickstart

pip install banks

from banks import Prompt

prompt_template = """
{% chat role="system" %}
You are a {{ persona }}.
{% endchat %}
"""

p = Prompt(prompt_template)
messages = p.chat_messages({"persona": "helpful assistant"})

Verify before relying

  • Whether optional dependencies (litellm, redis) are required for core templating or only for specific advanced features like LLM-based text generation and caching.
  • Performance characteristics when rendering complex templates with many dynamic LLM calls or large image payloads.
  • Stability guarantees given Beta development status (Development Status :: 4).

Package facts

License MIT (permissive)
Python support supports the current Python release (>=3.9)
Install friction low — pure-Python wheel
Runtime dependencies 7 — deprecated, eval-type-backport, filetype, griffe, jinja2, platformdirs, pydantic
Maintenance actively maintained — 6 days since the last release
Last repo commit
First released
Downloads 8,360,654/month — #1,631 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: banks-2.5.0-py3-none-any.whl

Development Status :: 4 - BetaProgramming Language :: PythonProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Programming Language :: Python :: 3.9Programming Language :: Python :: Implementation :: CPythonProgramming Language :: Python :: Implementation :: PyPy

Tags

llm prompt templatingchat message generationprompt versioning managementdynamic prompt renderingjinja2 prompt languagemultimodal prompt builderfunction calling in prompts
llm-promptingtemplate-engineprompt-management

More Markup packages