copier-templates-extensions
Deprecated (renamed). Install `copier-template-extensions` instead.
What it is and what it does
Copier Template-Extensions is a Jinja2 extension for the Copier project templating tool that solves a specific problem: loading custom Jinja2 extensions from file paths relative to your template root instead of requiring Python dotted import paths. This is useful when you want to bundle custom filters, tests, or macros directly inside your template project without publishing them as separate packages.
The package provides two main features. First, the TemplateExtensionLoader extension lets you register custom extensions by specifying a relative file path and class name (e.g., `extensions/slugify.py:SlugifyExtension`). Second, it includes a ContextHook base class that lets you modify the template rendering context programmatically—adding computed values, inferring answers from user input, or fetching external data—without cluttering your template files with complex Jinja logic. This is particularly useful in template projects where you want to keep template filenames and logic clean while still supporting dynamic behavior.
Use it for:
- Add custom Jinja filters (like slugify) to a Copier template without publishing a separate package.
- Infer template variables from user answers (e.g., derive module names based on project type) using a context hook.
- Organize template-specific extensions in a dedicated directory within your template project.
- Fetch or compute context data from external sources during template rendering phases.
- Keep template filenames simple and readable by computing derived values in Python instead of Jinja macros.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Provides a Jinja2 extension for Copier that loads custom template extensions from file paths relative to the template root, plus a context hook mechanism for modifying template rendering context.
Yes, if you maintain or author Copier templates and need to bundle custom Jinja extensions or dynamic context logic. The package is stable, permissively licensed, and has low install friction. The aging maintenance status (395 days since last release) is a minor concern but not a blocker—the repository is not archived, and the package supports current Python versions. Install it only if you are actively using Copier templates; it has no standalone utility.
Install
copier-templates-extensions on PyPI
pip
pip install copier-templates-extensionsuv
uv add copier-templates-extensionspoetry
poetry add copier-templates-extensionsInstalling copier-templates-extensions
Before you install
Low friction install with a single runtime dependency. Maintenance status is aging—last release was 395 days ago—but the repository remains active and the package supports current Python versions through 3.14.
License in practice
Licensed under ISC (permissive), allowing free use, modification, and distribution with minimal restrictions.
Quickstart
pip install copier-template-extensions
# In copier.yml:
_jinja_extensions:
- copier_template_extensions.TemplateExtensionLoader
- extensions/context.py:ContextUpdater
# In extensions/context.py:
from copier_template_extensions import ContextHook
class ContextUpdater(ContextHook):
def hook(self, context):
context["derived_value"] = some_computation(context)
Requires Python 3.9 or later; intended for use within Copier template projects, not standalone.
Verify before relying
- Whether the package is actively maintained or in maintenance-only mode given the 395-day gap since last release.
- Real-world performance or stability impact when context hooks run across multiple Copier rendering phases.
Package facts
| License | ISC (permissive) |
| Python support | supports the current Python release (>=3.9) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 1 — copier-template-extensions |
| Maintenance | aging — 395 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 138,153/month — #11,342 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: copier_templates_extensions-0.3.2-py3-none-any.whl
Tags
More Software Development packages
Provides backported and experimental type hints…
permissive · top 100 on PyPI
numpyNumPy provides an N-dimensional array object…
permissive · top 100 on PyPI
fastapiFastAPI is a Python web framework for building…
permissive · top 100 on PyPI
annotated-docProvides a way to document function parameters,…
permissive · top 100 on PyPI
typerTyper builds command-line applications from…
permissive · top 1,000 on PyPI
distlibDistlib provides low-level packaging utilities…
permissive · top 1,000 on PyPI
copier-template-extensionsExtends Copier's Jinja2 templating with a…
permissive · top 15,000 on PyPI
copierCopier is a template engine and CLI tool that…
permissive · top 5,000 on PyPI
Jinja2Jinja2 is a templating engine that renders…
permissive · top 100 on PyPI
mkdocs-macros-pluginExtends MkDocs with Jinja2 templating to use…
permissive · top 5,000 on PyPI
ruamel.yaml.jinja2Enables Jinja2 templating within YAML files by…
permissive · top 5,000 on PyPI
sphinx-jinjaA Sphinx extension that lets you embed Jinja2…
permissive · top 5,000 on PyPI
django-debug-toolbar-template-profilerAdds a debug panel to django-debug-toolbar that…
permissive · top 15,000 on PyPI
jinja_partialsAdds a `render_partial()` function to Jinja2…
permissive · top 5,000 on PyPI
mkdocs-include-markdown-pluginA MkDocs plugin that includes content from…
permissive · top 15,000 on PyPI
djhtmlDjHTML indents Django and Jinja template files…
copyleft · top 15,000 on PyPI