Skip to main content

Convert Rich tables to Markdown tables

Project description

Rich2MD

This is a simple tool to convert Rich tables to Markdown tables.

Installation

pip install rich2md

Usage

There are two functions:

  • rich_table_to_df – converts the Rich Table object to a Pandas DataFrame.
  • rich_table_to_md_table – converts the Rich Table object to a Markdown table and returns it as a string.

Example:

from rich.table import Table
from rich2md import rich_table_to_md_table

table = Table("A", "B")
table.add_row("my", "mom")
table.add_row("your", "dad")
table_md = rich_table_to_md_table(table)
print(table_md)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

rich2md-0.1.0.tar.gz (1.8 kB view hashes)

Uploaded Source

Built Distribution

rich2md-0.1.0-py3-none-any.whl (1.8 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page