Rich
4 articles in the last 30 days.
-
Rich tables in Python: Using Table, add_column, and add_row
A short how-to showing how to build and print a table with Rich's Table class, using add_column for headers and add_row for each row of values.
-
Rich Console: Set default styles with keyword arguments
Passing width and style to the Rich Console constructor sets defaults for later print calls. The post shows how these defaults interact with arguments passed to print.
-
Python Rich console: Setting text width and justification
Rich's Console.print accepts width and justify arguments, including 'full' and 'center', to lay out long strings neatly in the terminal.
-
Python Rich console: Separate style from text with Console.print
Rich's Console.print accepts a style argument, so formatting can be kept apart from the text being printed. The post shows bold and italic examples with colours.