pandocfilters
Utilities for writing pandoc filters in python
Decision gist · record as of 2026-08-14
Yes, if you need to write pandoc filters in Python. The package is stable, dependency-free, and widely used. The aging maintenance status is not a blocker—the library is feature-complete and the repository remains active—but verify that your pandoc version matches the documented compatibility (1.5.1 supports pandoc >= 1.16). No security vulnerabilities are known.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires pandoc >= 1.12 to be installed separately on your system; pandocfilters version must match your pandoc version (1.5.1 works with pandoc >= 1.16).
- Low install friction with no runtime dependencies.
- Maintenance is aging—last release was 2024-01-18, over 939 days ago—but the repository remains active and the package is widely used (top 1000 on PyPI with 60830168 monthly downloads).
License · maintenance · safety
BSD-3-Clause (permissive) — BSD-3-Clause permissive license allows use in most projects without significant restrictions, though you should review the full license text if bundling or modifying the code.
last release 2024-01-18 (939 days) · last repo commit 2025-09-16 · 560 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 60,830,168 downloads/mo, #499 on PyPI
Alternatives
Verify before relying
pip install pandocfilters
from pandocfilters import toJSONFilter, Str
def caps(key, value, format, meta):
if key == 'Str':
return Str(value.upper())
if __name__ == "__main__":
toJSONFilter(caps)- Whether the package actively maintains compatibility with pandoc versions beyond 1.17.3 or if it has known issues with recent pandoc releases.
- Performance characteristics when processing large documents or deeply nested AST structures.
What it is and what it does
pandocfilters is a Python library that simplifies writing filters for pandoc, the universal document converter. Pandoc filters are small programs that intercept and transform documents at the AST level by reading JSON-serialized syntax trees from stdin, applying custom logic, and writing modified JSON back to stdout. This package provides the plumbing: functions like `walk()` to traverse the document tree, `toJSONFilter()` to wrap your transformation logic into a complete filter, and helper functions like `stringify()` and `attributes()` for common AST manipulations.
The library has no runtime dependencies and works with Python 2.7 and Python 3.4 and later. It's designed for developers who want to extend pandoc's capabilities—converting text to uppercase, processing code blocks into images, interpolating metadata, or applying custom formatting rules—without writing boilerplate JSON parsing and tree-walking code. The package is mature and widely deployed, though maintenance is aging; it remains compatible with current pandoc versions as long as your version choice aligns with the documented compatibility matrix.
Use it for
- Write a filter to convert all code blocks of a certain class into generated diagrams or images using external tools.
- Transform emphasis or other inline elements into custom LaTeX macros for specialized document output.
- Interpolate metadata fields into document content or strip out sections marked with HTML comments.
- Build a filter that modifies link targets or image paths based on the output format or document context.
- Create a preprocessing step that normalizes or validates document structure before final conversion.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes, if you need to write pandoc filters in Python.
The package is stable, dependency-free, and widely used. The aging maintenance status is not a blocker—the library is feature-complete and the repository remains active—but verify that your pandoc version matches the documented compatibility (1.5.1 supports pandoc >= 1.16). No security vulnerabilities are known.
Install
pandocfilters on PyPI
Before you install
Low install friction with no runtime dependencies. Maintenance is aging—last release was 2024-01-18, over 939 days ago—but the repository remains active and the package is widely used (top 1000 on PyPI with 60830168 monthly downloads).
Requires pandoc >= 1.12 to be installed separately on your system; pandocfilters version must match your pandoc version (1.5.1 works with pandoc >= 1.16).
License in practice
BSD-3-Clause permissive license allows use in most projects without significant restrictions, though you should review the full license text if bundling or modifying the code.
Quickstart
pip install pandocfilters
from pandocfilters import toJSONFilter, Str
def caps(key, value, format, meta):
if key == 'Str':
return Str(value.upper())
if __name__ == "__main__":
toJSONFilter(caps)
Verify before relying
- Whether the package actively maintains compatibility with pandoc versions beyond 1.17.3 or if it has known issues with recent pandoc releases.
- Performance characteristics when processing large documents or deeply nested AST structures.
Package facts
| License | BSD-3-Clause permissive |
| Python support | Supports the current Python release >=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.* |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | None |
| Maintenance | Aging 939 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 60,830,168 / month, #499 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Development Status :: 3 - AlphaEnvironment :: ConsoleIntended Audience :: DevelopersIntended Audience :: End Users/DesktopLicense :: OSI Approved :: BSD LicenseOperating System :: OS IndependentProgramming Language :: PythonProgramming Language :: Python :: 2Programming Language :: Python :: 2.7Programming Language :: Python :: 3Programming Language :: Python :: 3.4Programming Language :: Python :: 3.5Programming Language :: Python :: 3.6Programming Language :: Python :: 3.7Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9Topic :: Text Processing :: Filters |
Evidence: pandocfilters-1.5.1-py2.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 › “pandoc filter python”
- pandocfiltersProvides Python utilities for writing pandoc filters that transform…
- panflutePanflute provides a Pythonic interface for writing Pandoc filters,…
- pandocPandoc Python Library wraps the Pandoc document model to analyze,…
Give your agent the search over MCP, or paste the wish link into any chat.
More Filters packages
Pygments is a syntax highlighter that colorizes source code and text in over 500 languages and formats, outputting to HTML, LaTeX, RTF, SVG, images, or ANSI terminal sequences.
Install it if you need to display or transform source code.
Converts Markdown text to HTML using a Python implementation of John Gruber's Markdown specification, with support for extensions.
Install it if you need to parse Markdown in Python.
NLTK is a Python library for natural language processing tasks including tokenization, parsing, tagging, and linguistic analysis, with built-in datasets and educational resources.
Install it if you need foundational NLP tools, linguistic datasets, or are learning the field; consider specialized libraries (spaCy, transformers) if you need…
Converts Unicode text to ASCII-safe representations by transliterating non-ASCII characters to their closest ASCII equivalents, useful for generating URL slugs, legacy system integration, and keyboard-friendly identifiers.
Install it if you need lossy Unicode-to-ASCII conversion and can accept GPLv2+ copyleft terms.
Pymdown Extensions provides a collection of additional extensions for Python Markdown that add syntax support for advanced formatting, including tabbed content, superfences with syntax highlighting, emoji, and other markup enhancements.
Install it if you need markdown features beyond the standard library.
Provides emoji and SVG icon extensions for MkDocs Material, enabling insertion of Material, FontAwesome, and Octicons into Markdown using emoji syntax.
See also pandoc · panflute · gron · pyandoc · pypandoc · markdown2 · pypandoc-binary · pytkdocs · pygeofilter · mongo-query-match