rich.rule

class rich.rule.Rule(title='', *, characters='─', style='rule.line', end='\n', align='center')[source]

A console renderable to draw a horizontal rule (line).

Parameters
  • title (Union[str, Text], optional) – Text to render in the rule. Defaults to “”.

  • characters (str, optional) – Character(s) used to draw the line. Defaults to “─”.

  • style (StyleType, optional) – Style of Rule. Defaults to “rule.line”.

  • end (str, optional) – Character at end of Rule. defaults to “\n”

  • align (str, optional) – How to align the title, one of “left”, “center”, or “right”. Defaults to “center”.