rs_rich.text¶
Generated from the type stubs by scripts/gen_python_api.py; do not edit.
rich.text: Text, Span and Lines.
Lines ¶
Span ¶
Bases: NamedTuple
Text ¶
from_markup
classmethod
¶
from_markup(text: str, *, style: Union[str, Style] = '', emoji: bool = True, emoji_variant: Optional[Literal['emoji', 'text']] = None, justify: Optional[JustifyMethod] = None, overflow: Optional[OverflowMethod] = None, end: str = '\n') -> Text
from_ansi
classmethod
¶
from_ansi(text: str, *, style: Union[str, Style] = '', justify: Optional[JustifyMethod] = None, overflow: Optional[OverflowMethod] = None, no_wrap: Optional[bool] = None, end: str = '\n', tab_size: Optional[int] = 8) -> Text
styled
classmethod
¶
styled(text: str, style: StyleType = '', *, justify: Optional[JustifyMethod] = None, overflow: Optional[OverflowMethod] = None) -> Text
assemble
classmethod
¶
assemble(*parts: Union[str, Text, Tuple[str, StyleType]], style: Union[str, Style] = '', justify: Optional[JustifyMethod] = None, overflow: Optional[OverflowMethod] = None, no_wrap: Optional[bool] = None, end: str = '\n', tab_size: int = 8, meta: Optional[Dict[str, Any]] = None) -> Text
stylize_before ¶
highlight_regex ¶
highlight_regex(re_highlight: Any, style: Optional[Union[Callable[[str], Optional[StyleType]], StyleType]] = None, *, style_prefix: str = '') -> int
highlight_words ¶
highlight_words(words: Iterable[str], style: Union[str, Style], *, case_sensitive: bool = True) -> int
truncate ¶
split ¶
split(separator: str = '\n', *, include_separator: bool = False, allow_blank: bool = False) -> Lines
wrap ¶
wrap(console: Console, width: int, *, justify: Optional[JustifyMethod] = None, overflow: Optional[OverflowMethod] = None, tab_size: int = 8, no_wrap: Optional[bool] = None) -> Lines
with_indent_guides ¶
with_indent_guides(indent_size: Optional[int] = None, *, character: str = '│', style: StyleType = 'dim green') -> Text