Hint: You can adjust the default video playback speed in your account settings.
Hint: You can set your subtitle preferences in your account settings.
Sorry! Looks like there’s an issue with video playback 🙁 This might be due to a temporary outage or because of a configuration issue with your browser. Please refer to our video player troubleshooting guide for assistance.

Installing Rich

00:00 Installing Rich, you can start using Rich very quickly. As always, when starting a new project or investigation, it’s best to create a virtual environment first, to avoid polluting your system’s Python installation, you can install Rich solely for use with the Python REPL, but in addition, you can also add support for Jupyter Notebooks at the same time.

00:21 So that’s the installation. You’ll see here the commands vary slightly between platforms. Here’s how to create and activate a virtual environment and then install Rich on Mac or Linux.

00:33 In this case using Python 3.12. And

00:56 here are the commands when using Windows Terminal.

01:24 Now that you’ve installed Rich in your new virtual environment, you can test it and also get a nice overview of its capabilities. As you can see, running this command makes a lot happen.

01:37 The terminal will fill with color and you’ll see several options for customizing your text-based user interface. Scrolling back to the top to see the full content.

01:46 You can see Rich’s support for colors, text styles and formatting, Asian language support, markup tables, syntax highlighting, and pretty printing markdown and more, apart from displaying colorful text in a variety of styles.

02:10 This demo also illustrates a few more of Rich’s exciting features. There’s much more you can do with Rich, as you’ll discover throughout this course. You can also try some of the command line demos that Rich has thoughtfully provided for its subpackages so that you can get a flavor of what each one can do without writing any code on screen, you’ll see a few that you can try from your operating system console, execute them one by one to get a feel for the power of Rich.

02:44 You may need to scroll up for the table demo as there are several example tables which will fill your screen. The settings for each table style demo are shown on screen above the table.

03:03 The progress demo shows how Rich can create progress bars and maintain their location on screen while other elements are being printed to it.

03:15 When you’ve seen enough, it will need to be interrupted with Control+C.

03:29 The status demo shows other useful Rich features.

03:51 With the installation done and a glimpse of what’s ahead, you are ready to start exploring Rich and you’ll start that exploration in the next part of the course.

03:59 Looking at using Rich for Python development.

Become a Member to join the conversation.