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 details)

Uploaded Source

Built Distribution

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

Uploaded Python 3

File details

Details for the file rich2md-0.1.0.tar.gz.

File metadata

  • Download URL: rich2md-0.1.0.tar.gz
  • Upload date:
  • Size: 1.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.13.0

File hashes

Hashes for rich2md-0.1.0.tar.gz
Algorithm Hash digest
SHA256 b313f4ea51ef6980614e3a77e83486ff9a0a6b5f1a55ccdf057bda8c1e567b01
MD5 5f5d919b36f0859d10c62d61c7408055
BLAKE2b-256 33c3bc69902430d2501c5cc953ae08c68d45f1d8d8957338723850ba7e65a6e0

See more details on using hashes here.

File details

Details for the file rich2md-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: rich2md-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 1.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.13.0

File hashes

Hashes for rich2md-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 98664b381e229cc306c60207269f0e25c7603ae3fd89c2c7fade24e66a79523c
MD5 8db44fcd8f670f45926922ae6bf95c2d
BLAKE2b-256 3d63778980146933a58c13461390b81edeba5d742209e3c53a3eaac3f518e57d

See more details on using hashes here.

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