pandocfilters
Utilities for writing pandoc filters in python
Install
pandocfilters on PyPI
pip
pip install pandocfiltersuv
uv add pandocfilterspoetry
poetry add pandocfiltersPackage 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 — 938 days since the last release |
| Last repo commit | |
| First released | |
| Popularity | one of the top 1,000 most-downloaded packages on PyPI (30-day window, as of 2026-08-13) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-13) |
Evidence: pandocfilters-1.5.1-py2.py3-none-any.whl
Keywords: pandoc
About pandocfilters
from the package's own PyPI description — quoted content, verbatim
pandocfilters
A python module for writing pandoc <http://pandoc.org/>_ filters
What are pandoc filters?
Pandoc filters are pipes that read a JSON serialization of the Pandoc AST from stdin, transform it in some way, and write it to stdout. They can be used with pandoc (>= 1.12) either using pipes ::
pandoc -t json -s | ./caps.py | pandoc -f json
or using the --filter (or -F) command-line option. ::
pandoc --filter ./caps.py -s
For more on pandoc filters, see the pandoc documentation under --filter
and the tutorial on writing filters__.
__ http://johnmacfarlane.net/pandoc/scripting.html
For an alternative library for writing pandoc filters, with
a more "Pythonic" design, see panflute__.
__ https://github.com/sergiocorreia/panflute
Compatibility
Pandoc 1.16 introduced link and image attributes to the existing
caption and target arguments, requiring a change in pandocfilters
that breaks backwards compatibility. Consequently, you should use:
- pandocfilters version <= 1.2.4 for pandoc versions 1.12--1.15, and
- pandocfilters version >= 1.3.0 for pandoc versions >= 1.16.
Pandoc...
Read as markdown · JSON record · Source repository · Homepage
AI interpretation — verify before relying
AI-generated interpretation of the package facts above; every digit, version, license, or vulnerability id it cites is grounded in the facts already shown on this page
pandocfilters is a Python library for writing pandoc filters that transform Pandoc's JSON AST representation by reading from stdin, applying custom transformations, and writing modified output to stdout.
Installation is straightforward with no runtime dependencies. The package is aging (938 days since last release) but remains actively maintained in its repository with recent commits; it supports Python 2.7 and 3.4+.
BSD-3-Clause is a permissive license allowing commercial and private use with minimal restrictions, requiring only preservation of copyright and license notices.
Usage
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)
Requires pandoc >= 1.12 installed separately; pandocfilters version must match pandoc version (<=1.2.4 for pandoc 1.12–1.15, >=1.3.0 for pandoc >=1.16).
Verdict: pandocfilters is a stable, dependency-free utility for building pandoc document transformations in Python. Its permissive BSD license and broad Python version support make it suitable for production use, though the aging maintenance status (938 days since release) suggests checking compatibility with your specific pandoc version before deployment.
Needs verification
- Whether the recent repository commits (last 2025-09-16) represent active maintenance or are minor fixes to an otherwise dormant project.
- Real-world adoption patterns beyond the top-1000 PyPI tier to assess whether the aging status reflects stability or declining usage.
Similar packages
permissive · top 1,000 on PyPI
tabulatepermissive · top 1,000 on PyPI
inflectionpermissive · top 1,000 on PyPI
mdurlpermissive · top 100 on PyPI
chardetpermissive · top 1,000 on PyPI
rignorepermissive · top 1,000 on PyPI
Pygmentspermissive · top 100 on PyPI
asttokenspermissive · top 1,000 on PyPI
hydra-corepermissive · top 1,000 on PyPI
ptyprocesspermissive · top 1,000 on PyPI