{"id":27941,"library":"markdowntable","title":"markdowntable","description":"A Python library for creating Markdown tables easily. Version 6.0.0 supports Python 3.7+ and provides a simple API to generate table strings. Earlier versions had different import paths and API.","status":"active","version":"6.0.0","language":"python","source_language":"en","source_url":"https://github.com/PokestarFan/Python-Markdown-Table","tags":["markdown","table","text-generation"],"install":[{"cmd":"pip install markdowntable","lang":"bash","label":"latest"}],"dependencies":[],"imports":[{"note":"v6.0.0 uses direct module-level functions; no class import.","wrong":"from markdowntable import MarkdownTable","symbol":"markdowntable","correct":"import markdowntable"}],"quickstart":{"code":"import markdowntable\n\ntable = markdowntable.create(\n    header=[\"Name\", \"Age\", \"City\"],\n    rows=[\n        [\"Alice\", 30, \"New York\"],\n        [\"Bob\", 25, \"London\"],\n        [\"Charlie\", 35, \"Paris\"]\n    ]\n)\nprint(table)","lang":"python","description":"Create a simple markdown table with header and rows."},"warnings":[{"fix":"Use `import markdowntable` and call `markdowntable.create()` instead.","message":"In v6.0.0, the API changed from class-based to module-level functions. Importing `MarkdownTable` from `markdowntable` will fail.","severity":"breaking","affected_versions":">=6.0.0"},{"fix":"Migrate to `import markdowntable` and use `markdowntable.create()`.","message":"The `MarkdownTable` class was deprecated in v5.x and removed in v6.0.0. Code using `from markdowntable import MarkdownTable` will break.","severity":"deprecated","affected_versions":"v6.0.0"},{"fix":"Ensure each row is a list of values matching the header length.","message":"The `create()` function expects a list of lists for `rows`, not a list of dicts or tuples. Mixing types may cause errors or incorrect table output.","severity":"gotcha","affected_versions":"all"}],"env_vars":null,"last_verified":"2026-05-09T00:00:00.000Z","next_check":"2026-08-07T00:00:00.000Z","problems":[{"fix":"Use `import markdowntable` and `table = markdowntable.create(...)`.","cause":"Importing the class name instead of the module.","error":"AttributeError: module 'markdowntable' has no attribute 'MarkdownTable'"},{"fix":"Provide both `header` (list of strings) and `rows` (list of lists).","cause":"Calling `create()` without required arguments.","error":"TypeError: create() missing 2 required positional arguments: 'header' and 'rows'"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}