Skip to main content

Panflute: Pythonic Pandoc Filters

Development Status Build Status License DOI

GitHub Releases PyPI version Conda Version Python version Supported implementations

panflute is a Python package that makes creating Pandoc filters fun.

For a detailed user guide, documentation, and installation instructions, see http://scorreia.com/software/panflute/. For examples that you can use as starting points, check the examples repo, the sample template, or this github search. If you want to contribute, head here.

You might also find useful this presentation on how I use markdown+pandoc+panflute to write research papers (at the Banco de Portugal 2019 Workshop on Reproductible Research).

Installation

Pip

To manage panflute using pip, open the command line and run

  • pip install panflute to install
    • pip install "panflute[extras]" to include extra dependencies (yamlloader)
  • pip install -U panflute to upgrade
  • pip uninstall panflute to remove

You need a matching pandoc version for panflute to work flawlessly. See [Supported pandoc versions] for details. Or, use the [Conda] method to install below to have the pandoc version automatically managed for you.

Conda

To manage panflute with a matching pandoc version, open the command line and run

  • conda install -c conda-forge pandoc 'panflute>=2.0.5' to install both conda install -c conda-forge pandoc 'panflute>=2.0.5' yamlloader to include extra dependencies
  • conda update pandoc panflute to upgrade both
  • conda remove pandoc panflute to remove both

You may also replace conda by mamba, which is basically a drop-in replacement of the conda package manager. See mamba-org/mamba: The Fast Cross-Platform Package Manager for details.

Note on versions

Supported Python versions

panflute 1.12 or above dropped support of Python 2. When using Python 3, depending on your setup, you may need to use pip3/python3 explicitly. If you need to use panflute in Python 2, install panflute 1.11.x or below.

Currently supported Python versions: Python version. Check pyproject.toml for details, which further indicates support of pypy on top of CPython.

Supported pandoc versions

pandoc versioning semantics is MAJOR.MAJOR.MINOR.PATCH and panflute's is MAJOR.MINOR.PATCH. Below we shows matching versions of pandoc that panflute supports, in descending order. Only major version is shown as long as the minor versions doesn't matter.

panflute version supported pandoc versions supported pandoc API versions
3.0.0 2.11.4–3.14 (see note) 1.22–1.23 (incl. 1.23.1.x)
2.3.1 2.11.0.4–3.1.x 1.22–1.23
2.2.4 2.11.0.4–2.17.x 1.22–1.22.1
2.1.x 2.11.0.4—2.14.x 1.22
2.0 2.11.0.4—2.11.x 1.22
not supported 2.10 1.21
1.12 2.7-2.9 1.17.5–1.20

Note on 3.0.0: the pandoc API version is the version of the JSON format in which pandoc passes documents to filters. Every pandoc release up to 3.14 uses API 1.22 (pandoc 2.11–2.19) or 1.23 (pandoc 3.x; pandoc-types 1.23 to 1.23.1.x did not change the JSON format), and panflute supports every element of both. CI runs the test suite against pandoc 2.11.4, 2.19.2, 3.0.1, 3.1.13, 3.6.4 and the latest release.

Note: pandoc 2.10 is short lived and 2.11 has minor API changes comparing to that, mainly for fixing its shortcomings. Please avoid using pandoc 2.10.

Dev Install

After cloning the repo and opening the panflute folder, run

  • python -m pip install . to install the package locally
  • python -m pip install -e ".[dev]" to install it in editable mode (changes are picked up automatically), together with the tools needed to run the tests (pytest) and the linter (ruff check .)

See CONTRIBUTING.md for details.

Contributing

Feel free to submit pull requests. For consistency, code should comply with pep8 (as long as its reasonable), and with the style guides by @kennethreitz and google. Read more here.

License

BSD3 license (following pandocfilters by @jgm).

Changelog

See CHANGELOG.md for the changes in each release, including the breaking changes in 3.0.

Metadata

Release files for panflute 3.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for panflute 3.0.0
File Size Uploaded Provenance Actions
panflute-3.0.0.tar.gz 622.4 kB With provenance Details for panflute-3.0.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for panflute 3.0.0
File Interpreter ABI Platform Actions
panflute-3.0.0-py3-none-any.whl Python 3 none any Details for panflute-3.0.0-py3-none-any.whl

Total release size: 668.6 kB

Release files / panflute-3.0.0.tar.gz

Download URL panflute-3.0.0.tar.gz
Size 622.4 kB
Tags Source
SHA-256 checksum
How to use checksums
7933538a1744f434be2d88a6284ddcc653642aa2f4d1f8136a56f63dcb25af2a
BLAKE2b-256 checksum
How to use checksums
847071e5ca6feaa6cc30fafafe8a55a841ef3c4bdf7144a643505329f559b96a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 20, 2026.

Transparency log

Release files / panflute-3.0.0-py3-none-any.whl

Download URL panflute-3.0.0-py3-none-any.whl
Size 46.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
b95d3c49ca79555b3fd3743e94ecd67967ddd8a0aeff3e48b45071081036816a
BLAKE2b-256 checksum
How to use checksums
500e087ffaa8dcaa42b451900bd0889193467d12b4698c7c44264d193f41802e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 20, 2026.

Transparency log

Security for panflute 3.0.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for panflute-3.0.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 20, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

3.0.0 This release

2 release files Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page