Defines a column within a ~Table.
title (Union[str, Text], optional) – The title of the table rendered at the top. Defaults to None.
caption (Union[str, Text], optional) – The table caption rendered below. Defaults to None.
width (int, optional) – The width in characters of the table, or None
to automatically fit. Defaults to None.
min_width (Optional[int], optional) – The minimum width of the table, or None
for no minimum. Defaults to None.
box (box.Box, optional) – One of the constants in box.py used to draw the edges (see Box), or None
for no box lines. Defaults to box.HEAVY_HEAD.
safe_box (Optional[bool], optional) – Disable box characters that don’t display on windows legacy terminal with raster fonts. Defaults to True.
padding (PaddingDimensions, optional) – Padding for cells (top, right, bottom, left). Defaults to (0, 1).
collapse_padding (bool, optional) – Enable collapsing of padding around cells. Defaults to False.
pad_edge (bool, optional) – Enable padding of edge cells. Defaults to True.
expand (bool, optional) – Expand the table to fit the available space if True
, otherwise the table width will be auto-calculated. Defaults to False.
show_header (bool, optional) – Show a header row. Defaults to True.
show_footer (bool, optional) – Show a footer row. Defaults to False.
show_edge (bool, optional) – Draw a box around the outside of the table. Defaults to True.
show_lines (bool, optional) – Draw lines between every row. Defaults to False.
leading (int, optional) – Number of blank lines between rows (precludes show_lines
). Defaults to 0.
style (Union[str, Style], optional) – Default style for the table. Defaults to “none”.
row_styles (List[Union, str], optional) – Optional list of row styles, if more than one style is given then the styles will alternate. Defaults to None.
header_style (Union[str, Style], optional) – Style of the header. Defaults to “table.header”.
footer_style (Union[str, Style], optional) – Style of the footer. Defaults to “table.footer”.
border_style (Union[str, Style], optional) – Style of the border. Defaults to None.
title_style (Union[str, Style], optional) – Style of the title. Defaults to None.
caption_style (Union[str, Style], optional) – Style of the caption. Defaults to None.
title_justify (str, optional) – Justify method for title. Defaults to “center”.
caption_justify (str, optional) – Justify method for caption. Defaults to “center”.
highlight (bool, optional) – Highlight cell contents (if str). Defaults to False.
header (RenderableType)
footer (RenderableType)
justify (JustifyMethod)
vertical (VerticalAlignMethod)
overflow (OverflowMethod)
max_width (int | None)
ratio (int | None)
no_wrap (bool)
_index (int)
_cells (List[RenderableType])
Get all cells in the column, not including header.
Return a copy of this Column.
Check if this column is flexible.
Renderable for the footer (typically a string)
RenderableType
The style of the footer.
StyleType
Renderable for the header (typically a string)
RenderableType
The style of the header.
StyleType
Apply highlighter to column. Defaults to False
.
How to justify text within the column (“left”, “center”, “right”, or “full”)
Maximum width of column, or None
for no maximum. Defaults to None.
Optional[int]
Minimum width of column, or None
for no minimum. Defaults to None.
Optional[int]
Prevent wrapping of text within the column. Defaults to False
.
Overflow method.
Ratio to use when calculating column width, or None
(default) to adapt to column contents.
Optional[int]
The style of the column.
StyleType
How to vertically align content (“top”, “middle”, or “bottom”)
Width of the column, or None
(default) to auto calculate width.
Optional[int]
Information regarding a row.
Indicated end of section, which will force a line beneath the row.
Style to apply to row.
A console renderable to draw a table.
*headers (Union[Column, str]) – Column headers, either as a string, or Column
instance.
title (Union[str, Text], optional) – The title of the table rendered at the top. Defaults to None.
caption (Union[str, Text], optional) – The table caption rendered below. Defaults to None.
width (int, optional) – The width in characters of the table, or None
to automatically fit. Defaults to None.
min_width (Optional[int], optional) – The minimum width of the table, or None
for no minimum. Defaults to None.
box (box.Box, optional) – One of the constants in box.py used to draw the edges (see Box), or None
for no box lines. Defaults to box.HEAVY_HEAD.
safe_box (Optional[bool], optional) – Disable box characters that don’t display on windows legacy terminal with raster fonts. Defaults to True.
padding (PaddingDimensions, optional) – Padding for cells (top, right, bottom, left). Defaults to (0, 1).
collapse_padding (bool, optional) – Enable collapsing of padding around cells. Defaults to False.
pad_edge (bool, optional) – Enable padding of edge cells. Defaults to True.
expand (bool, optional) – Expand the table to fit the available space if True
, otherwise the table width will be auto-calculated. Defaults to False.
show_header (bool, optional) – Show a header row. Defaults to True.
show_footer (bool, optional) – Show a footer row. Defaults to False.
show_edge (bool, optional) – Draw a box around the outside of the table. Defaults to True.
show_lines (bool, optional) – Draw lines between every row. Defaults to False.
leading (int, optional) – Number of blank lines between rows (precludes show_lines
). Defaults to 0.
style (Union[str, Style], optional) – Default style for the table. Defaults to “none”.
row_styles (List[Union, str], optional) – Optional list of row styles, if more than one style is given then the styles will alternate. Defaults to None.
header_style (Union[str, Style], optional) – Style of the header. Defaults to “table.header”.
footer_style (Union[str, Style], optional) – Style of the footer. Defaults to “table.footer”.
border_style (Union[str, Style], optional) – Style of the border. Defaults to None.
title_style (Union[str, Style], optional) – Style of the title. Defaults to None.
caption_style (Union[str, Style], optional) – Style of the caption. Defaults to None.
title_justify (str, optional) – Justify method for title. Defaults to “center”.
caption_justify (str, optional) – Justify method for caption. Defaults to “center”.
highlight (bool, optional) – Highlight cell contents (if str). Defaults to False.
Add a column to the table.
header (RenderableType, optional) – Text or renderable for the header. Defaults to “”.
footer (RenderableType, optional) – Text or renderable for the footer. Defaults to “”.
header_style (Union[str, Style], optional) – Style for the header, or None for default. Defaults to None.
highlight (bool, optional) – Whether to highlight the text. The default of None uses the value of the table (self) object.
footer_style (Union[str, Style], optional) – Style for the footer, or None for default. Defaults to None.
style (Union[str, Style], optional) – Style for the column cells, or None for default. Defaults to None.
justify (JustifyMethod, optional) – Alignment for cells. Defaults to “left”.
vertical (VerticalAlignMethod, optional) – Vertical alignment, one of “top”, “middle”, or “bottom”. Defaults to “top”.
overflow (OverflowMethod) – Overflow method: “crop”, “fold”, “ellipsis”. Defaults to “ellipsis”.
width (int, optional) – Desired width of column in characters, or None to fit to contents. Defaults to None.
min_width (Optional[int], optional) – Minimum width of column, or None
for no minimum. Defaults to None.
max_width (Optional[int], optional) – Maximum width of column, or None
for no maximum. Defaults to None.
ratio (int, optional) – Flexible ratio for the column (requires Table.expand
or Table.width
). Defaults to None.
no_wrap (bool, optional) – Set to True
to disable wrapping of this column.
None
Add a row of renderables.
*renderables (None or renderable) – Each cell in a row must be a renderable object (including str), or None
for a blank cell.
style (StyleType, optional) – An optional style to apply to the entire row. Defaults to None.
end_section (bool, optional) – End a section and draw a line. Defaults to False.
errors.NotRenderableError – If you add something that can’t be rendered.
None
Add a new section (draw a line after current row).
None
Setting a non-None self.width implies expand.
Get the current row style.
Get a table with no lines, headers, or footer.
*headers (Union[Column, str]) – Column headers, either as a string, or Column
instance.
padding (PaddingDimensions, optional) – Get padding around cells. Defaults to 0.
collapse_padding (bool, optional) – Enable collapsing of padding around cells. Defaults to True.
pad_edge (bool, optional) – Enable padding around edges of table. Defaults to False.
expand (bool, optional) – Expand the table to fit the available space if True
, otherwise the table width will be auto-calculated. Defaults to False.
A table instance.
Get cell padding.
Get the current number of rows.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4