rst2ansi
A rst converter to ansi-decorated console output
What it is and what it does
rst2ansi is a Python module that converts reStructuredText markup into ANSI-escaped strings for display in terminal environments. It handles RST formatting directives like bold and emphasis, translating them into terminal escape codes that render formatted text in console output.
The package works both as a standalone CLI tool (accepting a file path and printing formatted output) and as an importable module for programmatic use. It has no runtime dependencies, making installation straightforward. However, the package has not been actively maintained since 2016, raising questions about compatibility with modern Python releases.
Use it for:
- Display formatted RST documentation in terminal environments without rendering to HTML or PDF
- Build CLI tools that present rich, formatted help text or documentation from RST source files
- Convert RST markup to terminal-friendly output for log files or console-based documentation viewers
- Render project README files written in RST with formatting preserved in terminal output
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Converts reStructuredText documents to ANSI-escaped terminal output, suitable for rendering formatted text in console environments.
Yes, with caution. The package is lightweight, has no dependencies, and carries no known vulnerabilities. However, its last release was in 2016 and maintenance is stalled. Install it if you need simple RST-to-ANSI conversion and can test compatibility with your Python version; avoid it if you require active maintenance.
Install
rst2ansi on PyPI
pip
pip install rst2ansiuv
uv add rst2ansipoetry
poetry add rst2ansiInstalling rst2ansi
Before you install
Low install friction with no runtime dependencies. However, the package is aging—last release was 2016-05-24 and the last commit 2026-01-07, with no recent activity.
License in practice
MIT license is permissive, allowing use in commercial and private projects with minimal restrictions.
Quickstart
pip install rst2ansi
from rst2ansi import rst2ansi
print(rst2ansi('I **love** reStructuredText!'))
Verify before relying
- Whether the package works reliably with Python versions beyond 3.5 despite classifiers listing 3.3–3.5
- Current compatibility with modern reStructuredText syntax and edge cases
- Whether ANSI escape sequence handling covers all terminal types
Package facts
| License | MIT (permissive) |
| Python support | not specified |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | none |
| Maintenance | aging — 3,734 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 307,832/month — #7,772 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: rst2ansi-0.1.5-py3-none-any.whl
Keywords: rst, restructuredtext, ansi, console, code, converter
Tags
More Python Modules packages
Converts domain names between Unicode and…
permissive · top 100 on PyPI
setuptoolsSetuptools is a Python build backend and…
permissive · top 100 on PyPI
PyYAMLPyYAML parses and emits YAML 1.1 data format,…
permissive · top 100 on PyPI
pydanticPydantic validates Python data structures…
permissive · top 100 on PyPI
annotated-typesProvides reusable metadata objects for use with…
permissive · top 100 on PyPI
typing-inspectionProvides runtime tools to inspect and…
permissive · top 100 on PyPI
rich-rstRenders reStructuredText documents as Rich…
permissive · top 1,000 on PyPI
ansi2htmlConverts terminal output with ANSI color codes…
copyleft · top 5,000 on PyPI
pansiPansi provides a clean interface for rendering…
permissive · top 15,000 on PyPI
docutilsDocutils converts plaintext documentation in…
unclear · top 1,000 on PyPI
ansimarkupAnsimarkup converts XML-like markup tags into…
permissive · top 15,000 on PyPI
inscriptisConverts HTML documents to plain text while…
permissive · top 5,000 on PyPI
rst2pdfConverts reStructuredText documents directly to…
permissive · top 15,000 on PyPI
m2r2Converts markdown files with embedded…
permissive · top 15,000 on PyPI
enrichExtends the rich library with a Console class…
permissive · top 5,000 on PyPI
treetableRenders nested data structures as formatted…
permissive · top 15,000 on PyPI