$npx skillfedfor your agent

markdown-exec

Utilities to execute code blocks in Markdown files.

With conditionsPyPI Software DevelopmentReleased Jul 2026975.4K downloads / moISCPure Python

Decision gist · record as of 2026-08-14

pure-Python wheel — markdown_exec-1.12.3-py3-none-any.whl
v1.12.3 · released 2026-07-07 · Python >=3.10 · 1 runtime deps: pymdown-extensions

Yes, if you maintain documentation with code examples that need to stay current. The low install friction, active maintenance, permissive license, and lack of known vulnerabilities make it safe to adopt. Install with caution only if your documentation build process runs untrusted code, since execution happens at build time—otherwise it's a straightforward win for keeping examples accurate.AI-flagged interpretation of the facts on this page — verify before relying

Before you install

  • Requires Python 3.10 or later; pymdown-extensions must be installed as a runtime dependency.
  • Low friction: pure Python wheel with a single runtime dependency (pymdown-extensions).
  • Actively maintained with recent releases; last commit 2026-07-08.

License · maintenance · safety

ISC (permissive) — ISC license is permissive and imposes minimal restrictions; suitable for both open-source and commercial use without copyleft obligations.

last release 2026-07-07 (38 days) · last repo commit 2026-07-08 · 172 stars

0 known vulnerabilities (OSV.dev, 2026-08-14) · 975,437 downloads/mo, #4,596 on PyPI

Verify before relying

pip install markdown-exec

from markdown import Markdown
from markdown_exec import formatter, validator

Markdown(
    extensions=["pymdownx.superfences"],
    extension_configs={
        "pymdownx.superfences": {
            "custom_fences": [{
                "name": "python",
                "class": "python",
                "validator": validator,
                "format": formatter,
            }]
        }
    }
)
  • Security implications of executing arbitrary code blocks during documentation builds
  • Performance impact when processing large numbers of code blocks or long-running scripts
  • Whether pyodide support is fully functional or still experimental
Same gist for agents: .md · .json

What it is and what it does

Markdown Exec is a Markdown extension that transforms code blocks into executable snippets. When you mark a code block with `exec="on"`, the extension runs that code and injects the output back into the document in place of the original block. It works as a plugin for MkDocs or as a standalone Markdown extension, integrating with pymdown-extensions' SuperFences to handle multiple languages including Python, bash, and console sessions.

The package is designed for documentation workflows where you want code examples to stay synchronized with their actual output—write a Python snippet that generates HTML or a bash command that lists files, and the rendered documentation automatically shows what that code produces. It supports optional ANSI color rendering for terminal output via the `ansi` extra, and can be configured to expect specific exit codes or handle errors gracefully.

Use it for

  • Auto-generate API documentation by executing code examples that produce formatted output
  • Keep shell command examples in docs synchronized with their real output
  • Build documentation sites where Python snippets compute and display results
  • Create reproducible tutorials where code blocks run during the build and embed their results
  • Generate tables or formatted lists in Markdown by executing Python code that produces them

Worth the install?

AI-flagged interpretation of the facts on this page. Verify before relying on it.

With conditions

Yes, if you maintain documentation with code examples that need to stay current.

The low install friction, active maintenance, permissive license, and lack of known vulnerabilities make it safe to adopt. Install with caution only if your documentation build process runs untrusted code, since execution happens at build time—otherwise it's a straightforward win for keeping examples accurate.

Install

markdown-exec on PyPI

Before you install

Low friction: pure Python wheel with a single runtime dependency (pymdown-extensions). Actively maintained with recent releases; last commit 2026-07-08. Requires Python 3.10 or later.

Requires Python 3.10 or later; pymdown-extensions must be installed as a runtime dependency.

License in practice

ISC license is permissive and imposes minimal restrictions; suitable for both open-source and commercial use without copyleft obligations.

Quickstart

pip install markdown-exec

from markdown import Markdown
from markdown_exec import formatter, validator

Markdown(
    extensions=["pymdownx.superfences"],
    extension_configs={
        "pymdownx.superfences": {
            "custom_fences": [{
                "name": "python",
                "class": "python",
                "validator": validator,
                "format": formatter,
            }]
        }
    }
)

Verify before relying

  • Security implications of executing arbitrary code blocks during documentation builds
  • Performance impact when processing large numbers of code blocks or long-running scripts
  • Whether pyodide support is fully functional or still experimental

Package facts

LicenseISC permissive
Python supportSupports the current Python release >=3.10
Install frictionLow. Pure-Python wheel
Runtime dependencies
1 package
pymdown-extensions
MaintenanceActively maintained 38 days since the last release
Last repo commit
First released
Downloads975,437 / month, #4,596 on PyPI 30-day window, as of 2026-08-14
Known vulnerabilitiesNone known OSV.dev, checked 2026-08-14
Classifiers
Development Status :: 4 - BetaIntended Audience :: DevelopersProgramming Language :: PythonProgramming Language :: Python :: 3Programming Language :: Python :: 3 :: OnlyProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Topic :: DocumentationTopic :: Software DevelopmentTopic :: UtilitiesTyping :: Typed

Evidence: markdown_exec-1.12.3-py3-none-any.whl

Tags

Capabilities
execute code in markdownmarkdown code block executiondynamic markdown generationmkdocs code executionmarkdown to html with code outputembedded script execution markdownmarkdown documentation automation
Topics
mkdocs-plugindocumentation-automationcode-execution
PyPI keywords
markdownpythonexecshellbashmkdocs

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 › “execute code in markdown”

  • markdown-execExecutes code blocks embedded in Markdown files and replaces them…
  • pytest-codeblocksA pytest plugin that automatically discovers and runs Python and…
  • pytest-markdown-docsA pytest plugin that executes Python code snippets embedded in…

Give your agent the search over MCP, or paste the wish link into any chat.

More Software Development packages

typing-extensions Worth it
PyPI · Software Development · released Jul 2026

Provides backported and experimental type hints for Python 3.9+, allowing use of newer typing features on older Python versions and enabling early experimentation with type system PEPs before they enter the standard library.

PSF-2.0pure Python · 3.9+
1.9Bdownloads / mo
numpy Worth it
PyPI · Software Development · released Aug 2026

NumPy provides an N-dimensional array object and a comprehensive suite of mathematical, linear algebra, Fourier transform, and random number functions for scientific computing in Python.

BSD-3-Clause AND 0BSD AND MIT AND Zlib AND CC0-1.0compiled wheel · 3.12+
1.1Bdownloads / mo
fastapi Worth it
PyPI · Software Development · released Jul 2026

FastAPI is a Python web framework for building REST APIs using type hints, with automatic request validation, serialization, and interactive API documentation.

MITpure Python · 3.10+
568.6Mdownloads / mo
annotated-doc With conditions
PyPI · Software Development · released Jul 2026

Provides a way to document function parameters, class attributes, return types, and variables inline using Python's `Annotated` type hint syntax instead of traditional docstrings.

MITpure Python · 3.9+
456.2Mdownloads / mo
typer Worth it
PyPI · Software Development · released Aug 2026

Typer builds command-line applications from Python functions using type hints, automatically generating help text, argument parsing, and shell completion.

Install it if you are building CLIs in Python.

MITpure Python · 3.10+
369.3Mdownloads / mo
distlib With conditions
PyPI · Software Development · released Jun 2026

Distlib provides low-level packaging utilities for building, distributing, and managing Python software—including metadata handling, version specifiers, wheel support, script installation, and dependency resolution.

permissive licensepure Python
323.3Mdownloads / mo

See also cogapp · pytest-markdown-docs · doccmd · markdown-callouts · mkdocs-markdownextradata-plugin · md2pdf · mkdocs-kroki-plugin · mkdocs-macros-plugin · mkdocs-click · sybil