Registry / web-framework / markdown-callouts

markdown-callouts

JSON →
library0.4.0pypypiunverified

markdown-callouts is a Python-Markdown extension that enhances documentation with admonition-style callouts. It supports various syntaxes, including a flexible original style (e.g., `NOTE:`), collapsible blocks (`>? TIP:`), and the GitHub 'alerts' syntax (`> [!NOTE]`). The current version is 0.4.0, and new features are added incrementally, often focusing on compatibility with existing Markdown parsers and popular documentation tools like MkDocs.

pip install markdown-callouts
INSTALL
IMPORT
SIG · MARKDOWN-CALLOUTS
M
markdown-callouts
web-frameworkpythonv0.4.0
Install
1.7s avg
Import
Disk
17MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v0.4.0 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.910 runs
installs and imports cleanly · install 0.0s · import 0.000s · 18.5MB
glibc
py 3.103.910 runs
installs and imports cleanly · install 1.7s · import 0.000s · 19MB
17MB installed
● package 17MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

callouts
mkdocs.yml: - callouts Python: extensions=['callouts']
This is a string identifier for the Markdown extension, used in configuration files (MkDocs) or when initializing the Markdown parser (Python). It is not a Python module to be imported directly.
github-callouts
mkdocs.yml: - github-callouts Python: extensions=['github-callouts']
Introduced in v0.4.0, this string identifier enables the GitHub-style 'alerts' syntax (`> [!NOTE]`). It can be used alongside the 'callouts' extension if both syntaxes are desired. Not a direct Python import.

To use markdown-callouts, enable the desired extensions in your `mkdocs.yml` file (for MkDocs projects) or pass them to the `extensions` parameter when initializing the `markdown.Markdown` parser in Python. The example demonstrates common usage within an MkDocs project.

# mkdocs.yml site_name: My Docs markdown_extensions: - callouts - github-callouts # For GitHub-style alerts, v0.4.0+ # docs/index.md content example: # NOTE: This is a standard callout. # # > [!WARNING] # > This is a GitHub-style alert. # # >? TIP: **Click me for more info.** # > # > This content is collapsible.
Debug
Known issues
gotchaThe package provides two distinct callout extensions: `callouts` and `github-callouts`, which implement different syntaxes.
fix
Enable both `callouts` and `github-callouts` in your `markdown_extensions` list (or `extensions` parameter) if you intend to use both the original flexible syntax and the GitHub-style `> [!TYPE]` alerts. The `github-callouts` extension handles the GitHub syntax, while `callouts` handles `NOTE:` and `>? TIP:`.
affects: v0.4.0+
gotchaLike all Python-Markdown extensions, `markdown-callouts` must be explicitly enabled to function.
fix
Always add `callouts` and/or `github-callouts` to the `markdown_extensions` list in your `mkdocs.yml` or pass them in the `extensions` parameter when using `markdown.markdown()` in Python code. The extensions are not active by default.
affects: All versions
gotchaCallout syntax has evolved across versions, introducing new features with specific patterns.
fix
Refer to the official documentation for the exact syntax for specific features: custom titles (v0.2.0+), collapsible blocks (v0.3.0+), and GitHub alerts (v0.4.0+). Incorrect or legacy syntax may not render as expected or might be ignored.
affects: All versions
Upgrade
Version history
0.4.0latest on PyPI · released Jan 22, 2024
Audit
Dependencies
MarkdownrequiredCore dependency for Python-Markdown extensions; `markdown-callouts` extends `Markdown.extensions.Extension`.
Agent activity
2 hits · last 30 days
node
2
Resources
markdown-callouts — pip install markdown-callouts · libregistry