$npx skillfedfor your agent

docstrfmt

docstrfmt: A formatter for Sphinx flavored reStructuredText.

With conditionsPyPI UtilitiesReleased Jun 202681.9K downloads / mopermissive licensePure Python

Decision gist · record as of 2026-08-14

pure-Python wheel — docstrfmt-2.2.0-py3-none-any.whl
v2.2.0 · released 2026-06-21 · Python >=3.10 · 12 runtime deps: black, click, coverage, docutils, docutils-stubs, libcst, platformdirs, roman

Yes, if you work with reStructuredText or Sphinx-style docstrings and want automated, opinionated formatting. The low install friction, active maintenance, permissive license, and zero known vulnerabilities make it a safe choice. The beta status and acknowledged gaps in construct coverage are worth noting if you rely on advanced reStructuredText features, but for typical docstrings and markup it is stable and ready to use.AI-flagged interpretation of the facts on this page — verify before relying

Before you install

  • Requires Python 3.10 or later.
  • Low friction: pure Python wheel with no compiled dependencies.
  • Active maintenance, last commit 2026-08-10, and the project is in beta but described as mostly stable.

License · maintenance · safety

permissive license (permissive) — Permissive license (MIT) means you can use, modify, and distribute this package freely in commercial and private projects without significant restrictions.

last release 2026-06-21 (54 days) · last repo commit 2026-08-10 · 43 stars

0 known vulnerabilities (OSV.dev, 2026-08-14) · 81,877 downloads/mo, #14,194 on PyPI

Verify before relying

pip install docstrfmt

docstrfmt myfile.py
# or read from stdin and write to stdout:
cat myfile.py | docstrfmt
  • Coverage of less common reStructuredText constructs beyond the most common ones mentioned as currently supported.
  • Performance characteristics when formatting large files or many files in batch.
  • Stability guarantees or breaking-change policy given the beta status.
Same gist for agents: .md · .json

What it is and what it does

docstrfmt is a command-line tool that automatically formats reStructuredText markup and Python docstrings to a consistent, opinionated style. It draws inspiration from Black and rstfmt, aiming to reduce style discussions and manual formatting work by enforcing a single reasonable format. The tool reads Python files or raw reStructuredText and rewrites docstrings and markup according to its rules, with configurable line length that defaults to Black's 88 characters or can be read from pyproject.toml.

The package depends on Black, libcst, docutils, Sphinx, and related utilities to parse and reformat the text. It runs as a command-line tool or optionally as an HTTP daemon (docstrfmtd) to avoid repeated startup costs. Currently in beta, it covers most common reStructuredText constructs but acknowledges gaps in coverage for less common syntax.

Use it for

  • Enforce consistent docstring formatting across a Python project's codebase automatically.
  • Integrate docstring formatting into pre-commit hooks to catch style issues before commit.
  • Format standalone reStructuredText files (e.g., documentation, README files) to match project conventions.
  • Run as a daemon service to format docstrings on-demand via HTTP in editor plugins or CI pipelines.
  • Migrate existing docstrings to a standardized format 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 work with reStructuredText or Sphinx-style docstrings and want automated, opinionated formatting.

The low install friction, active maintenance, permissive license, and zero known vulnerabilities make it a safe choice. The beta status and acknowledged gaps in construct coverage are worth noting if you rely on advanced reStructuredText features, but for typical docstrings and markup it is stable and ready to use.

Install

docstrfmt on PyPI

Before you install

Low friction: pure Python wheel with no compiled dependencies. Active maintenance, last commit 2026-08-10, and the project is in beta but described as mostly stable.

Requires Python 3.10 or later.

License in practice

Permissive license (MIT) means you can use, modify, and distribute this package freely in commercial and private projects without significant restrictions.

Quickstart

pip install docstrfmt

docstrfmt myfile.py
# or read from stdin and write to stdout:
cat myfile.py | docstrfmt

Verify before relying

  • Coverage of less common reStructuredText constructs beyond the most common ones mentioned as currently supported.
  • Performance characteristics when formatting large files or many files in batch.
  • Stability guarantees or breaking-change policy given the beta status.

Package facts

Licensepermissive license permissive
Python supportSupports the current Python release >=3.10
Install frictionLow. Pure-Python wheel
Runtime dependencies
12 packages
blackclickcoveragedocutilsdocutils-stubslibcstplatformdirsromansphinxtabulatetomlitypes-docutils
MaintenanceActively maintained 54 days since the last release
Last repo commit
First released
Downloads81,877 / month, #14,194 on PyPI 30-day window, as of 2026-08-14
Known vulnerabilitiesNone known OSV.dev, checked 2026-08-14
Classifiers
Development Status :: 4 - BetaEnvironment :: ConsoleIntended Audience :: DevelopersLicense :: OSI Approved :: MIT LicenseProgramming Language :: PythonProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Topic :: DocumentationTopic :: Documentation :: SphinxTopic :: Software Development :: DocumentationTopic :: Utilities

Evidence: docstrfmt-2.2.0-py3-none-any.whl

Tags

Capabilities
restructuredtext formatterdocstring formattersphinx documentation formatterrst code formatterautomatic docstring formattingpython docstring stylereStructuredText linter
Topics
code-formatterdocstring-lintersphinx
PyPI keywords
blackdocutilsautoformatterformatterlintrestructuredtextrstsphinx

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 › “restructuredtext formatter”

  • docstrfmtAutomatically formats reStructuredText in files and Python docstrings…
  • sphinxcontrib-napoleonA Sphinx extension that converts Google and NumPy style docstrings…
  • docstring-to-markdownConverts Python docstrings from reStructuredText and Google format to…

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

More Utilities packages

idna Worth it
PyPI · Python Modules · released Jun 2026

Converts domain names between Unicode and ASCII-compatible encoding (Punycode) according to IDNA 2008 and Unicode Technical Standard 46, with security validation and broader script coverage than the standard library.

Install it if you work with internationalized domain names, need to validate domains, or use HTTP clients that depend on it transitively.

BSD-3-Clausepure Python · 3.9+
1.8Bdownloads / mo
charset-normalizer Worth it
PyPI · Utilities · released Aug 2026

Detects and normalizes text encoding from unknown or ambiguous sources, supporting all IANA character sets that Python's core library provides codecs for, with the ability to register custom codecs.

permissive licensepure Python · 3.7+
1.7Bdownloads / mo
setuptools Worth it
PyPI · Python Modules · released Aug 2026

Setuptools is a Python build backend and package management tool that handles building, distributing, and installing Python packages, including support for C/C++ extension modules.

MITpure Python · 3.10+
1.6Bdownloads / mo
pluggy Worth it
PyPI · Libraries · released May 2025

Pluggy provides a plugin system that lets you define hook specifications and register implementations to be called in sequence, enabling extensible Python applications without tight coupling.

Install it if you're building an extensible application or framework.

MITpure Python · 3.9+aging
1.3Bdownloads / mo
Pygments Worth it
PyPI · Utilities · released Mar 2026

Pygments is a syntax highlighter that colorizes source code and text in over 500 languages and formats, outputting to HTML, LaTeX, RTF, SVG, images, or ANSI terminal sequences.

Install it if you need to display or transform source code.

BSD-2-Clausepure Python · 3.9+
1.3Bdownloads / mo
six With conditions
PyPI · Libraries · released Dec 2024

Six provides utility functions to write Python code that runs on both Python 2.7 and Python 3.3+, smoothing over language differences between the two versions.

MITpure Python
1.2Bdownloads / mo

See also rich-rst · sphinx-lint · esbonio · restructuredtext-lint · rstcheck · flake8-rst-docstrings · blacken-docs · docstring-to-markdown · doc8 · rstcheck-core