from rich.text import Text text = Text.from_markup("Hello, *world*!") print(text)
from rich.text import Text text1 = Text.from_markup("Check out [bold underline]this link[/bold underline]: < https://pypi.org/projects/rich >") text2 = Text.from_markup("This is [bold underline]a bit of bold and underlined text[/bold underline], with [italic]& italic &[/italic] [bold underline on #00FF00]& alternate &[/bold underline on #00FF00] [bold underline]& colors &[/bold underline].") print(text1) print(text2)This returns the following lines : Check out **this link**: https://pypi.org/projects/rich This is **_a bit of bold and underlined text_**, with * italic * **& alternate &** ***& colors &***.