Rich reStructuredText Renderer

1.3.2 · active · verified Sat Mar 28

A Python library that provides a beautiful reStructuredText renderer, integrating with the `rich` library to display reStructuredText documents with syntax highlighting and rich formatting directly in the terminal. It's currently at version 1.3.2 and maintains an active release cadence with regular updates and bug fixes.

Warnings

Install

Imports

Quickstart

This quickstart demonstrates how to import `RestructuredText` from `rich_rst` and use it with `rich.print` to render a reStructuredText string directly to your terminal with rich formatting.

from rich_rst import RestructuredText
from rich import print

rst_content = """
My Document
===========

This is a *simple* reStructuredText document.

.. code:: python

    print('Hello, Rich RST!')

- Item 1
- Item 2

.. note:: This is a note.
"""

# Render the reStructuredText to the console
print(RestructuredText(rst_content))

view raw JSON →