Warning: This document is for the development version of terminaltables. The latest version is v3.1.0.

GithubFlavoredMarkdownTable

GithubFlavoredMarkdownTable was initially implemented bcho. It produces a GitHub Flavored Markdown formatted table.

Because there are no outer table borders:

  • Table titles are ignored.
  • Border display toggles are also ignored.
_images/githubtable.png _images/githubtable_rendered.png

API

class terminaltables.GithubFlavoredMarkdownTable(table_data)

Github flavored markdown table.

https://help.github.com/articles/github-flavored-markdown/#tables

Variables:
  • table_data (iter) – List (empty or list of lists of strings) representing the table.
  • justify_columns (dict) – Horizontal justification. Keys are column indexes (int). Values are right/left/center.
column_max_width(column_number)

Return the maximum width of a column based on the current terminal width.

Parameters:column_number (int) – The column number to query.
Returns:The max width of the column.
Return type:int
column_widths

Return a list of integers representing the widths of each table column without padding.

ok

Return True if the table fits within the terminal width, False if the table breaks.

table

Return a large string of the entire table ready to be printed to the terminal.

table_width

Return the width of the table including padding and borders.