Mention rich.get_console() in Console API docs

This commit is contained in:
Matt Garber 2025-02-11 12:48:14 -05:00
parent 43d3b04725
commit 93d02c9356

View file

@ -10,6 +10,11 @@ Then you can import the console from anywhere in your project like this::
from my_project.console import console
You can also get a global console instance from the package-level API::
import rich
console = rich.get_console()
The console object handles the mechanics of generating ANSI escape sequences for color and style. It will auto-detect the capabilities of the terminal and convert colors if necessary.