logo

... rich.


Print statements are nice but you can make them (literally) richer than just plain text. The rich package helps you do just that.


Episode Notes

Here's the code used in this video.

from rich.console import Console
import time 

console = Console()
for i in range(10):
    console.log(f"I am about to sleep={i}")
    time.sleep(0.2)
    console.log(f"But I am briefly awake now.")

Feedback? See an issue? Feel free to mention it here.

If you want to be kept up to date, consider getting the newsletter.