skillfed

rich-text-renderer

Contentful Rich Text Renderer

rich-text-renderer v0.2.8 358.3K downloads/30d#7,263 on PyPI8
Permissive license MIT Active released

What it is and what it does

This package transforms Contentful RichText field data—a structured document format from Contentful's content delivery API—into renderable output, defaulting to HTML. It works by walking a tree of content nodes (paragraphs, headings, links, embedded entries, etc.) and applying a handler to each node type. The rendering logic is fully customizable: you can override any node handler to serialize to plain text, Markdown, JSON, or any other format you need.

It's designed to pair with the Contentful Delivery SDK and handles the common case where you fetch RichText content from Contentful and need to display it in a web app or other output medium. The library includes sensible HTML defaults but requires you to implement custom renderers for embedded entries (e.g., product cards, author bios) since only you know your content model.

Use it for:

  • Render Contentful blog post bodies to HTML for display on a website
  • Convert RichText documents to plain text for search indexing or email previews
  • Implement custom rendering for embedded Contentful entries (e.g., product references within marketing copy)
  • Serialize RichText to Markdown or a custom markup format for downstream processing
  • Handle unknown or future node types gracefully by providing a fallback renderer

Worth the install?

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

Converts Contentful RichText field data into HTML or custom formats by rendering a tree of content nodes with overridable handlers for each node type.

Yes. This is a focused, stable library with no dependencies, active maintenance, and a permissive license. Install it if you're using Contentful's RichText field type and need to render or transform that content in Python. The customizable renderer design makes it suitable for both simple HTML output and complex content workflows.

Install

rich-text-renderer on PyPI

pip

pip install rich-text-renderer

uv

uv add rich-text-renderer

poetry

poetry add rich-text-renderer

Installing rich-text-renderer

Before you install

Low friction: pure Python wheel with no runtime dependencies. Actively maintained; last commit 2026-08-08, marked Production/Stable. No known vulnerabilities.

License in practice

MIT license (permissive). You may use, modify, and distribute this package freely in commercial or private projects with minimal restrictions.

Quickstart

from rich_text_renderer import RichTextRenderer

renderer = RichTextRenderer()
html_output = renderer.render(document)

Verify before relying

  • Whether the package works with modern Python versions beyond 3.9 (classifiers list ends at 3.9; current support status unclear)
  • Performance characteristics when rendering large or deeply nested RichText documents
  • Compatibility with recent versions of the Contentful Delivery SDK

Package facts

License MIT (permissive)
Python support not specified
Install friction low — pure-Python wheel
Runtime dependencies none
Maintenance actively maintained — 1,023 days since the last release
Last repo commit
First released
Downloads 358,284/month — #7,263 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: rich_text_renderer-0.2.8-py3-none-any.whl

Keywords: contentful, delivery, cda, cms, content

Development Status :: 5 - Production/StableIntended Audience :: DevelopersLicense :: OSI Approved :: MIT LicenseNatural Language :: EnglishProgramming Language :: Python :: 2Programming Language :: Python :: 2.7Programming Language :: Python :: 3Programming Language :: Python :: 3.1Programming Language :: Python :: 3.2Programming Language :: Python :: 3.3Programming Language :: Python :: 3.4Programming Language :: Python :: 3.5Programming Language :: Python :: 3.6Programming Language :: Python :: 3.7Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9Topic :: Software Development :: Libraries

Tags

contentful rich text to htmlrender contentful richtextcontentful cms content renderingrichtext node serializationcontentful delivery sdk integrationcustom content node rendererscontentful embedded entry rendering
contentfulcontent-deliverymarkup-rendering

More Libraries packages