$npx skillfedfor your agent

mdformat-black

Mdformat plugin to Blacken Python code blocks

With conditionsPyPI MarkupReleased Sep 2020114.4K downloads / moMITPure Python

Decision gist · record as of 2026-08-14

pure-Python wheel — mdformat_black-0.1.1-py3-none-any.whl
v0.1.1 · released 2020-09-24 · Python >=3.6,<4.0 · 2 runtime deps: mdformat, black

Yes, if you use mdformat and want Python code blocks in your Markdown to follow Black's style. The low install friction, permissive license, and lack of known vulnerabilities make it straightforward. However, the aging maintenance status (last release 2020-09-24) means you should verify compatibility with your current Black and mdformat versions before relying on it in production workflows.AI-flagged interpretation of the facts on this page — verify before relying

Before you install

  • Requires mdformat and black to be installed; Python >=3.6,<4.0
  • Low install friction with just two runtime dependencies.
  • The package is aging—last release was 2020-09-24 and last commit 2025-03-09—but remains unarchived.

License · maintenance · safety

MIT (permissive) — MIT license is permissive; you can use, modify, and distribute freely with minimal restrictions.

last release 2020-09-24 (2150 days) · last repo commit 2025-03-09 · 9 stars

0 known vulnerabilities (OSV.dev, 2026-08-14) · 114,372 downloads/mo, #12,299 on PyPI

Verify before relying

pip install mdformat-black

import mdformat
unformatted = "```python\n'''black converts quotes'''\n```\n"
formatted = mdformat.text(unformatted, codeformatters={"python"})
assert formatted == '```python\n"""black converts quotes"""\n```\n'
  • Whether the package works reliably with recent versions of black and mdformat beyond classifier claims.
  • Whether there are known incompatibilities with Python 3.9+ despite the 'supports_current' designation.
Same gist for agents: .md · .json

What it is and what it does

mdformat-black is a plugin that extends mdformat to apply Black's Python code formatting rules to Python code blocks within Markdown files. When installed, mdformat automatically recognizes and formats Python code blocks using Black's conventions—converting quote styles, enforcing line length, and applying other Black rules—while leaving the rest of your Markdown untouched.

The plugin works both from the command line (automatically after install) and programmatically via mdformat's Python API (where you must explicitly enable it by passing `codeformatters={"python"}` to mdformat.text()). It requires Python >=3.6,<4.0 and depends on mdformat and black as runtime dependencies.

Use it for

  • Automatically format Python code examples in technical documentation to match your project's Black style.
  • Ensure consistency between code snippets in README files and your actual codebase formatting.
  • Integrate Python code block formatting into a Markdown linting or CI pipeline alongside mdformat.
  • Format Python code blocks in blog posts or tutorials written in Markdown without manual editing.

Worth the install?

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

With conditions

Yes, if you use mdformat and want Python code blocks in your Markdown to follow Black's style.

The low install friction, permissive license, and lack of known vulnerabilities make it straightforward. However, the aging maintenance status (last release 2020-09-24) means you should verify compatibility with your current Black and mdformat versions before relying on it in production workflows.

Install

mdformat-black on PyPI

Before you install

Low install friction with just two runtime dependencies. The package is aging—last release was 2020-09-24 and last commit 2025-03-09—but remains unarchived.

Requires mdformat and black to be installed; Python >=3.6,<4.0

License in practice

MIT license is permissive; you can use, modify, and distribute freely with minimal restrictions.

Quickstart

pip install mdformat-black

import mdformat
unformatted = "```python\n'''black converts quotes'''\n```\n"
formatted = mdformat.text(unformatted, codeformatters={"python"})
assert formatted == '```python\n"""black converts quotes"""\n```\n'

Verify before relying

  • Whether the package works reliably with recent versions of black and mdformat beyond classifier claims.
  • Whether there are known incompatibilities with Python 3.9+ despite the 'supports_current' designation.

Package facts

LicenseMIT permissive
Python supportSupports the current Python release >=3.6,<4.0
Install frictionLow. Pure-Python wheel
Runtime dependencies
2 packages
mdformatblack
MaintenanceAging 2,150 days since the last release
Last repo commit
First released
Downloads114,372 / month, #12,299 on PyPI 30-day window, as of 2026-08-14
Known vulnerabilitiesNone known OSV.dev, checked 2026-08-14
Classifiers
License :: OSI Approved :: MIT LicenseProgramming Language :: Python :: 3Programming Language :: Python :: 3.6Programming Language :: Python :: 3.7Programming Language :: Python :: 3.8Topic :: DocumentationTopic :: Text Processing :: MarkupTyping :: Typed

Evidence: mdformat_black-0.1.1-py3-none-any.whl

Tags

Capabilities
markdown python code formattermdformat black pluginformat python in markdownblack code blocks markdownmarkdown code formattingpython block formattermdformat plugin
Topics
markdown-formattingcode-style-enforcement
PyPI keywords
mdformatmarkdowncommonmarkformatter

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 › “mdformat black plugin”

  • mdformat-blackA plugin for mdformat that automatically formats Python code blocks…
  • mdformat-footnoteAdds footnote parsing and formatting support to mdformat, enabling…
  • mdformat_deflistExtends mdformat with support for parsing and formatting definition…

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

More Markup packages

PyYAML Worth it
PyPI · Python Modules · released Sep 2025

PyYAML parses and emits YAML 1.1 data format, enabling serialization and deserialization of configuration files and Python objects to and from human-readable YAML text.

MITcompiled wheel · 3.8+
1.2Bdownloads / mo
markdown-it-py Worth it
PyPI · Python Modules · released May 2026

A Python markdown parser that converts markdown to HTML following the CommonMark specification, with support for plugins and custom syntax rules.

Install it if you need reliable markdown-to-HTML conversion.

MITpure Python · 3.10+
613.8Mdownloads / mo
beautifulsoup4 Worth it
PyPI · Python Modules · released Jun 2026

Beautiful Soup parses HTML and XML documents into a navigable tree, providing Pythonic methods to search, iterate, and modify the parsed content.

Install it if you need to parse or extract data from markup documents.

MITpure Python · 3.7.0+
432.1Mdownloads / mo
et-xmlfile With conditions
PyPI · Markup · released Oct 2024

et_xmlfile writes large XML files with minimal memory overhead by serializing elements to disk as they are created, rather than holding the entire tree in memory.

Install it if incremental XML writing fits your use case; skip it if your XML documents are small or you already use lxml.

MITpure Python · 3.8+dormant
343.3Mdownloads / mo
tomlkit Worth it
PyPI · Markup · released Jul 2026

Parses and edits TOML files while preserving formatting, comments, and structure, then serializes them back with layout intact.

Install it if you're building tools that touch TOML files and user readability of the source matters.

MITpure Python · 3.9+
338.0Mdownloads / mo
docstring-parser Worth it
PyPI · Python Modules · released Apr 2026

Parses Python docstrings in ReST, Google, Numpydoc, and Epydoc formats, extracting structured information like descriptions, parameters, return types, and exceptions.

Install it if you need to programmatically read and extract structured data from Python docstrings.

MITpure Python · 3.8+
274.9Mdownloads / mo

See also mdformat-ruff · pyink · mdformat-toc · mdformat_myst · mdformat · black · blacken-docs · mdformat-gfm-alerts · mdformat_tables · mdformat-mkdocs