mirror of
https://github.com/Textualize/rich.git
synced 2025-08-04 18:18:22 +00:00
Mention rich.get_console() in Console API docs
This commit is contained in:
parent
43d3b04725
commit
93d02c9356
1 changed files with 5 additions and 0 deletions
|
@ -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.
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue