MCPcopy
hub / github.com/Textualize/rich / Column

Class Column

rich/table.py:39–128  ·  rich/table.py::Column

Defines a column within a ~Table. Args: 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 charact

Source from the content-addressed store, hash-verified

37
38@dataclass
39class Column:
40 class="st">"""Defines a column within a ~Table.
41
42 Args:
43 title (Union[str, Text], optional): The title of the table rendered at the top. Defaults to None.
44 caption (Union[str, Text], optional): The table caption rendered below. Defaults to None.
45 width (int, optional): The width in characters of the table, or ``None`` to automatically fit. Defaults to None.
46 min_width (Optional[int], optional): The minimum width of the table, or ``None`` for no minimum. Defaults to None.
47 box (box.Box, optional): One of the constants in box.py used to draw the edges (see :ref:`appendix_box`), or ``None`` for no box lines. Defaults to box.HEAVY_HEAD.
48 safe_box (Optional[bool], optional): Disable box characters that don&class="cm">#x27;t display on windows legacy terminal with *raster* fonts. Defaults to True.
49 padding (PaddingDimensions, optional): Padding for cells (top, right, bottom, left). Defaults to (0, 1).
50 collapse_padding (bool, optional): Enable collapsing of padding around cells. Defaults to False.
51 pad_edge (bool, optional): Enable padding of edge cells. Defaults to True.
52 show_header (bool, optional): Show a header row. Defaults to True.
53 show_footer (bool, optional): Show a footer row. Defaults to False.
54 show_edge (bool, optional): Draw a box around the outside of the table. Defaults to True.
55 show_lines (bool, optional): Draw lines between every row. Defaults to False.
56 leading (int, optional): Number of blank lines between rows (precludes ``show_lines``). Defaults to 0.
57 style (Union[str, Style], optional): Default style for the table. Defaults to class="st">"none".
58 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.
59 header_style (Union[str, Style], optional): Style of the header. Defaults to class="st">"table.header".
60 footer_style (Union[str, Style], optional): Style of the footer. Defaults to class="st">"table.footer".
61 border_style (Union[str, Style], optional): Style of the border. Defaults to None.
62 title_style (Union[str, Style], optional): Style of the title. Defaults to None.
63 caption_style (Union[str, Style], optional): Style of the caption. Defaults to None.
64 title_justify (str, optional): Justify method for title. Defaults to class="st">"center".
65 caption_justify (str, optional): Justify method for caption. Defaults to class="st">"center".
66 highlight (bool, optional): Highlight cell contents (if str). Defaults to False.
67 class="st">"""
68
69 header: class="st">"RenderableType" = class="st">""
70 class="st">""class="st">"RenderableType: Renderable for the header (typically a string)"class="st">""
71
72 footer: class="st">"RenderableType" = class="st">""
73 class="st">""class="st">"RenderableType: Renderable for the footer (typically a string)"class="st">""
74
75 header_style: StyleType = class="st">""
76 class="st">""class="st">"StyleType: The style of the header."class="st">""
77
78 footer_style: StyleType = class="st">""
79 class="st">""class="st">"StyleType: The style of the footer."class="st">""
80
81 style: StyleType = class="st">""
82 class="st">""class="st">"StyleType: The style of the column."class="st">""
83
84 justify: class="st">"JustifyMethod" = class="st">"left"
85 class="st">""class="st">"str: How to justify text within the column ("leftclass="st">", "centerclass="st">", "rightclass="st">", or "fullclass="st">")"class="st">""
86
87 vertical: class="st">"VerticalAlignMethod" = class="st">"top"
88 class="st">""class="st">"str: How to vertically align content ("topclass="st">", "middleclass="st">", or "bottomclass="st">")"class="st">""
89
90 overflow: class="st">"OverflowMethod" = class="st">"ellipsis"
91 class="st">""class="st">"str: Overflow method."class="st">""
92
93 width: Optional[int] = None
94 class="st">""class="st">"Optional[int]: Width of the column, or ``None`` (default) to auto calculate width."class="st">""
95
96 min_width: Optional[int] = None

Callers 7

test_init_append_columnFunction · 0.90
attrs.pyFile · 0.90
get_table_columnMethod · 0.85
__init__Method · 0.85
make_tasks_tableMethod · 0.85
add_columnMethod · 0.85
add_rowMethod · 0.85

Calls

no outgoing calls

Tested by 1

test_init_append_columnFunction · 0.72