jinja2-ansible-filters
A port of Ansible's jinja2 filters without requiring ansible core.
Decision gist · record as of 2026-08-14
Yes, if you need Ansible-style Jinja2 filters and can accept the GPL3 copyleft license. The package is lightweight, has low install friction, and works well for template-heavy projects. However, do not install if your project is proprietary or closed-source (GPL3 is a blocker), or if you require active maintenance and compatibility updates—the project is abandoned and has not been updated since 2022-06-30. Test compatibility with your current Jinja2 version before relying on it in production.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires Jinja2 and PyYAML to be installed; compatibility with Jinja2 versions 3.1+ requires the environmentfilter-to-pass_environment rename, which is included in version 1.3.1+.
- Installation is straightforward with low friction; the package has only two runtime dependencies (Jinja2 and PyYAML).
- However, the project is marked as abandoned with no releases since 2022-06-30, which means bug fixes and compatibility updates are unlikely.
License · maintenance · safety
GPL3 (copyleft) — The package is released under GPL3 (copyleft), which means any code that incorporates or distributes this package must also be released under compatible open-source terms. This is a significant constraint for proprietary or closed-source projects.
last release 2022-06-30 (1506 days)
0 known vulnerabilities (OSV.dev, 2026-08-14) · 2,061,330 downloads/mo, #3,330 on PyPI
Alternatives
Verify before relying
from jinja2 import Environment
from jinja2_ansible_filters import AnsibleCoreFiltersExtension
env = Environment(extensions=[AnsibleCoreFiltersExtension])
template = env.from_string('{{ "hello" | b64encode }}')
result = template.render()- Whether the package remains compatible with current Jinja2 and PyYAML versions beyond what version 1.3.2 tested.
- Whether the GPL3 license applies to the entire codebase or only portions derived from Ansible (the description mentions both GPL3 and BSD).
- Performance characteristics or memory overhead when using the full filter set in high-volume templating scenarios.
- Total number of filters provided by the package across all categories.
What it is and what it does
This package extracts and ports Ansible's Jinja2 template filters into a standalone library, so you can use Ansible-style filtering in any Jinja2 template without installing the full Ansible framework. It includes filters for common operations: base64 encoding/decoding, file path manipulation (basename, dirname, realpath), hashing (md5, sha1, checksum), JSON and YAML conversion, regex operations, and utility filters like type checking and UUID generation. A few filters with heavy Ansible dependencies (combine, get_encrypted_password, dict2items, items2dict) are excluded, and two filters (groupby, random) are prefixed with ans_ to avoid collisions with Jinja2 builtins.
The package is a thin extension layer that registers these filters as a Jinja2 extension, so you load it by passing AnsibleCoreFiltersExtension to your Environment. It depends only on Jinja2 and PyYAML, making it lightweight to add to projects that already use those libraries. However, the project has been abandoned since 2022-06-30 with no maintenance activity, so compatibility with newer Jinja2 releases is not guaranteed beyond what was tested at version 1.3.2.
Use it for
- Use it to port Ansible playbook templates to standalone Jinja2 rendering without Ansible as a runtime dependency.
- Use it in cookiecutter templates to access Ansible-style filters for file path and data transformation during project scaffolding.
- Use it to add base64, JSON, YAML, and regex filters to Jinja2 environments in configuration management or templating pipelines.
- Use it to perform hashing and encoding operations (md5, sha1, b64encode) directly in templates without custom filter registration.
- Use it in static site generators or documentation tools that use Jinja2 and need Ansible-compatible filter semantics.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes, if you need Ansible-style Jinja2 filters and can accept the GPL3 copyleft license.
The package is lightweight, has low install friction, and works well for template-heavy projects. However, do not install if your project is proprietary or closed-source (GPL3 is a blocker), or if you require active maintenance and compatibility updates—the project is abandoned and has not been updated since 2022-06-30. Test compatibility with your current Jinja2 version before relying on it in production.
Install
jinja2-ansible-filters on PyPI
Before you install
Installation is straightforward with low friction; the package has only two runtime dependencies (Jinja2 and PyYAML). However, the project is marked as abandoned with no releases since 2022-06-30, which means bug fixes and compatibility updates are unlikely.
Requires Jinja2 and PyYAML to be installed; compatibility with Jinja2 versions 3.1+ requires the environmentfilter-to-pass_environment rename, which is included in version 1.3.1+.
License in practice
The package is released under GPL3 (copyleft), which means any code that incorporates or distributes this package must also be released under compatible open-source terms. This is a significant constraint for proprietary or closed-source projects.
Quickstart
from jinja2 import Environment
from jinja2_ansible_filters import AnsibleCoreFiltersExtension
env = Environment(extensions=[AnsibleCoreFiltersExtension])
template = env.from_string('{{ "hello" | b64encode }}')
result = template.render()
Verify before relying
- Whether the package remains compatible with current Jinja2 and PyYAML versions beyond what version 1.3.2 tested.
- Whether the GPL3 license applies to the entire codebase or only portions derived from Ansible (the description mentions both GPL3 and BSD).
- Performance characteristics or memory overhead when using the full filter set in high-volume templating scenarios.
- Total number of filters provided by the package across all categories.
Package facts
| License | GPL3 copyleft |
| Python support | Not specified |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | 2 packagesJinja2PyYAML |
| Maintenance | Abandoned 1,506 days since the last release |
| First released | |
| Downloads | 2,061,330 / month, #3,330 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
Evidence: jinja2_ansible_filters-1.3.2-py3-none-any.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “jinja2 ansible filters”
- jinja2-ansible-filtersProvides a collection of Jinja2 template filters ported from Ansible,…
- jinja2-cliA command-line interface for Jinja2 templating that renders templates…
- ansible-creatorA CLI tool that scaffolds new Ansible projects and adds resources to…
Give your agent the search over MCP, or paste the wish link into any chat.
More Text Processing packages
A drop-in replacement for Python's standard `re` module that adds advanced regex features like nested sets, fuzzy matching, lookaround in conditionals, and full Unicode case-folding while maintaining backward compatibility.
pyparsing provides a library for building text parsers directly in Python code using composable grammar classes, handling quoted strings, whitespace variation, and embedded comments without regex or lex/yacc.
Install it if you need to parse text or define grammars programmatically.
fonttools manipulates font files in multiple formats (TrueType, OpenType, AFM, Type 1, Mac-specific) and includes TTX, a tool to convert fonts to and from XML text format.
Install it if you need to read, write, or manipulate fonts programmatically or via the TTX command-line tool.
Docutils converts plaintext documentation in reStructuredText format into multiple output formats including HTML, XML, and LaTeX using a modular processing system.
RapidFuzz provides fast fuzzy string matching using Levenshtein Distance and related metrics, implemented mostly in C++ with Python bindings for rapid similarity scoring and approximate string matching.
Install it if you need fuzzy string matching; it's a solid replacement for FuzzyWuzzy with better licensing and performance.
tinycss2 parses CSS strings into token and block objects, and generates CSS strings from those objects, following the CSS Syntax Level 3 specification without enforcing specific properties or values.
Install it if your project requires CSS tokenization or syntax manipulation.
See also jinja2-strcase · jinja2-cli · jinjanator · jinja2-humanize-extension · jinja2_pluralize · Jinja2 · j2cli · ruamel.yaml.jinja2 · jinja-cli · jinjanator-plugins