skillfed

sphinxcontrib-towncrier

An RST directive for injecting a Towncrier-generated changelog draft containing fragments for the unreleased (next) project version

sphinxcontrib-towncrier v0.5.0a0 163.1K downloads/30d#10,577 on PyPI20
Permissive license BSD 3-Clause License Active released

What it is and what it does

sphinxcontrib-towncrier is a Sphinx extension that bridges Sphinx documentation builds with Towncrier, a changelog management tool. It provides an RST directive that automatically renders a draft changelog containing unreleased fragments into your documentation. The extension reads your project's towncrier configuration and injects the generated changelog at build time, allowing you to display work-in-progress release notes alongside your main documentation.

The package has two runtime dependencies: sphinx and towncrier. It supports Python 3.9 through 3.13 and is classified as alpha-stage software. The extension offers configurable version title generation modes (draft, sphinx-version, or sphinx-release) and allows you to override the title with custom text. It's used by projects like ansible/pylibssh and pypa/pip to keep changelog drafts visible during documentation builds.

Use it for:

  • Display unreleased changelog fragments in your project's documentation site during development.
  • Automatically generate a draft release notes section in Sphinx docs without manual maintenance.
  • Keep contributors and users informed of upcoming changes by embedding the towncrier draft in your docs.
  • Integrate changelog management into your Sphinx build pipeline for single-source documentation.
  • Override auto-generated version titles with custom release labels or status markers in the changelog.

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

A Sphinx extension that automatically injects a Towncrier-generated changelog draft into documentation, displaying unreleased project version fragments.

Yes, if you use both Sphinx and Towncrier for your project. The extension solves a real integration gap and is actively maintained. However, note that it is still alpha-stage software (version 0.5.0a0), so expect potential API changes. Install it when you want unreleased changelog fragments visible in your documentation builds without manual duplication.

Install

sphinxcontrib-towncrier on PyPI

pip

pip install sphinxcontrib-towncrier

uv

uv add sphinxcontrib-towncrier

poetry

poetry add sphinxcontrib-towncrier

Installing sphinxcontrib-towncrier

Before you install

Low install friction with only two runtime dependencies (sphinx and towncrier). Actively maintained with a recent release in February 2025 and ongoing repository activity.

License in practice

BSD 3-Clause License is permissive, allowing commercial and private use with minimal restrictions beyond attribution and liability disclaimers.

Quickstart

pip install sphinxcontrib-towncrier

# In conf.py:
extensions = ['sphinxcontrib.towncrier.ext']
towncrier_draft_autoversion_mode = 'draft'
towncrier_draft_working_directory = PROJECT_ROOT_DIR

# In changelog.rst:
.. towncrier-draft-entries::

Requires towncrier to be pre-configured in your project's pyproject.toml; the extension reads towncrier's configuration from that file.

Verify before relying

  • Whether the alpha version (0.5.0a0) is stable enough for production documentation builds.
  • Performance characteristics when handling large numbers of changelog fragments.
  • Compatibility with custom towncrier fragment types beyond the defaults.

Package facts

License BSD 3-Clause License (permissive)
Python support supports the current Python release (>=3.9)
Install friction low — pure-Python wheel
Runtime dependencies 2 — sphinx, towncrier
Maintenance actively maintained — 532 days since the last release
Last repo commit
First released
Downloads 163,082/month — #10,577 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: sphinxcontrib_towncrier-0.5.0a0-py3-none-any.whl

Development Status :: 3 - AlphaFramework :: SphinxFramework :: Sphinx :: ExtensionIntended Audience :: DevelopersLicense :: OSI Approved :: BSD LicenseOperating System :: OS IndependentProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.9Topic :: Documentation :: SphinxTopic :: Software Development :: DocumentationTopic :: System :: Software DistributionTopic :: Utilities

Tags

sphinx changelog directivetowncrier sphinx integrationunreleased changelog in docssphinx extension documentationtowncrier draft entrieschangelog fragment injectionsphinx documentation automation
sphinx-extensionchangelog-managementdocumentation-automation

More Utilities packages