py-markdown-table
Package that generates markdown tables from a list of dicts
What it is and what it does
py-markdown-table is a lightweight Python library that converts lists of dictionaries into formatted markdown tables. It takes uniform dictionaries (where all dicts have the same keys) and renders them as markdown-formatted tables with the dict keys becoming column headers and the values becoming rows.
The library offers granular control over table formatting through a chainable `set_params()` method, allowing you to configure row separators (always, topbottom, markdown, or none), per-column or global padding width and alignment (left, right, centerleft, centerright), custom padding and newline characters, float rounding precision, emoji spacing, and multiline column widths. It integrates easily with pandas by converting dataframes to dict records first.
Use it for:
- Generate markdown documentation tables from structured data programmatically
- Format API response data or database query results as readable markdown for reports
- Convert pandas DataFrames to markdown tables for embedding in markdown files or READMEs
- Create aligned, padded tables in CLI tools that output markdown-formatted text
- Build markdown tables with custom column widths and text wrapping for long content
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Generates formatted markdown tables from lists of dictionaries, with support for padding, alignment, multiline text, and float rounding.
Yes. Zero dependencies, active maintenance, permissive license, and broad Python version support (3.8–3.13) make it a low-risk choice. Install if you need to programmatically generate markdown tables from structured data; the formatting options are substantial enough for most use cases.
Install
py-markdown-table on PyPI
pip
pip install py-markdown-tableuv
uv add py-markdown-tablepoetry
poetry add py-markdown-tableInstalling py-markdown-table
Before you install
Low friction: pure Python wheel with zero runtime dependencies and active maintenance (last commit 2026-07-25). Supports Python 3.8 through 3.13.
License in practice
MIT license (permissive) places no restrictions on use, modification, or distribution.
Quickstart
pip install py-markdown-table
from py_markdown_table.markdown_table import markdown_table
data = [{"Product": "Smartphone", "Brand": "Apple", "Price": 999.99}]
markdown = markdown_table(data).get_markdown()
print(markdown)
Verify before relying
- Whether the package handles edge cases like empty data, None values, or non-uniform dict keys gracefully
- Performance characteristics with very large tables or deeply nested multiline content
Package facts
| License | MIT (permissive) |
| Python support | supports the current Python release (<4.0,>=3.8) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | none |
| Maintenance | actively maintained — 554 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 814,131/month — #4,993 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: py_markdown_table-1.3.0-py3-none-any.whl
Tags
More Markup packages
PyYAML parses and emits YAML 1.1 data format,…
permissive · top 100 on PyPI
markdown-it-pyA Python markdown parser that converts markdown…
permissive · top 100 on PyPI
beautifulsoup4Beautiful Soup parses HTML and XML documents…
permissive · top 100 on PyPI
et-xmlfileet_xmlfile writes large XML files with minimal…
permissive · top 1,000 on PyPI
tomlkitParses and edits TOML files while preserving…
permissive · top 1,000 on PyPI
docstring-parserParses Python docstrings in ReST, Google,…
permissive · top 1,000 on PyPI
texttableCreates formatted ASCII tables for console…
permissive · top 1,000 on PyPI
FixedWidthConverts between Python dictionaries and…
permissive · top 5,000 on PyPI
columnarColumnar formats tabular data into aligned,…
permissive · top 5,000 on PyPI
markdown-tableGenerates Markdown-formatted tables from Python…
permissive · top 15,000 on PyPI
tabulateFormats and prints tabular data in plain text…
permissive · top 1,000 on PyPI
table-loggerTableLogger formats and outputs tabular data to…
copyleft · top 15,000 on PyPI
PTablePTable formats tabular data into visually…
permissive · top 15,000 on PyPI
beautifultablePrints tabular data to the terminal in a…
permissive · top 15,000 on PyPI
pretty-html-tableConverts pandas DataFrames into styled HTML…
permissive · top 5,000 on PyPI
mdformat_tablesmdformat-tables is a plugin for mdformat that…
permissive · top 15,000 on PyPI