Metadata-Version: 2.1
Name: rich2md
Version: 0.1.0
Summary: Convert Rich tables to Markdown tables
License: MIT
Author: Krzysztof J. Czarnecki
Author-email: kjczarne@gmail.com
Requires-Python: >=3.10,<4.0
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Requires-Dist: pandas (>=2.2.3,<3.0.0)
Requires-Dist: rich (>=13.9.2,<14.0.0)
Description-Content-Type: text/markdown

# Rich2MD

This is a simple tool to convert [Rich](https://github.com/Textualize/rich) tables to Markdown tables.

## Installation

```bash
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:

```python
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)
```

