skillfed

hatch-fancy-pypi-readme

Fancy PyPI READMEs with Hatch

hatch-fancy-pypi-readme v25.1.0 7.6M downloads/30d#1,711 on PyPI189
Permissive license MIT Active released

What it is and what it does

hatch-fancy-pypi-readme is a Hatch metadata plugin that lets you build your PyPI project description dynamically from reusable fragments. Instead of maintaining a single static readme or long_description, you define an ordered list of fragments in your pyproject.toml—each can be plain text, a whole file, or a slice of a file extracted using cut-off points or regex patterns. After assembly, you can run regex-based substitutions across the entire readme to fix relative links, linkify issue numbers, or make other global transformations.

It solves the common problem of wanting your PyPI readme to differ from your GitHub readme (e.g., without badges, with only the latest changelog section, or with absolute links). You configure it once in pyproject.toml and the plugin generates the readme at build time, eliminating the need for manual synchronization or complex setup.py logic.

Use it for:

  • Assemble a PyPI readme from your main README minus badges, plus your LICENSE file and the latest release notes from CHANGELOG.
  • Extract and display only the most recent version's changes from a changelog file using regex pattern matching.
  • Automatically convert relative GitHub links to absolute PyPI-safe URLs via regex substitution across the final readme.
  • Maintain separate documentation for GitHub (with badges and development notes) and PyPI (user-focused) without duplication.
  • Build a readme that includes snippets from multiple source files, each trimmed to specific sections using start/end markers.

Worth the install?

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

A Hatch plugin that generates dynamic PyPI project descriptions by concatenating text fragments, files, and file excerpts with regex-based filtering and substitution.

Yes. This is a stable, actively maintained plugin with low install friction and no security issues. Install it if you use Hatch and want to compose your PyPI readme from multiple sources or apply transformations without manual editing. Skip it only if you're satisfied with a static readme file or not using Hatch.

Install

hatch-fancy-pypi-readme on PyPI

pip

pip install hatch-fancy-pypi-readme

uv

uv add hatch-fancy-pypi-readme

poetry

poetry add hatch-fancy-pypi-readme

Installing hatch-fancy-pypi-readme

Before you install

Low friction install with only two runtime dependencies (hatchling and tomli). Active maintenance with a recent release in 2025 and steady commit activity; no known vulnerabilities.

License in practice

MIT license permits unrestricted use, modification, and distribution with minimal obligations—suitable for any project type.

Quickstart

# In pyproject.toml:
[build-system]
requires = ["hatchling", "hatch-fancy-pypi-readme"]
build-backend = "hatchling.build"

[project]
dynamic = ["readme"]

[tool.hatch.metadata.hooks.fancy-pypi-readme]
content-type = "text/markdown"

[[tool.hatch.metadata.hooks.fancy-pypi-readme.fragments]]
text = "# My Project"

[[tool.hatch.metadata.hooks.fancy-pypi-readme.fragments]]
path = "README.md"

Requires Hatch as your build backend; only works with pyproject.toml-based projects.

Verify before relying

  • Whether regex substitutions support all standard Python re module flags and features beyond DOTALL.
  • Performance characteristics when assembling very large readmes from many fragments or large files.
  • Whether file paths are resolved relative to the project root or the pyproject.toml location.

Package facts

License MIT (permissive)
Python support supports the current Python release (>=3.8)
Install friction low — pure-Python wheel
Runtime dependencies 2 — hatchling, tomli
Maintenance actively maintained — 470 days since the last release
Last repo commit
First released
Downloads 7,632,891/month — #1,711 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: hatch_fancy_pypi_readme-25.1.0-py3-none-any.whl

Keywords: documentation, hatch, pypi, readme

Development Status :: 5 - Production/StableFramework :: HatchOperating System :: OS IndependentProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9Topic :: Software Development :: Build Tools

Tags

hatch metadata plugindynamic pypi readme generationreadme assembly from fragmentspypi long description builderhatch build tool extension
hatch-pluginpypi-metadatabuild-automation

More Build Tools packages