Rich is a Python library for rich text and beautiful formatting in the terminal.
Questions tagged [rich]
99 questions
1
vote
1 answer
Listing the Document ID from TinyDB
I am trying to list out the content of db.json from this github (https://github.com/syntaxsmurf/todo/blob/main/main.py) on line 40 in main.py
Specifically this line
for item in db:
table.add_row( item["task"], item["completed_by"],…

Andreas Frederiksen
- 21
- 3
0
votes
1 answer
Is this a Python Rich's feature or a bug?
I'm making an app in Python using Supabase and Rich.
Everytime I make a request to the Supabase API, Rich will print some kind of log, and I don't know if this is a feature that I can disable or a bug.
I've tried uninstalling Rich and Supabase does…

Sylph1de
- 1
- 2
0
votes
0 answers
Change the title color in python rich panel
Is it possible to change the title color in python rich panel?
I have tried several ways, and I have not succeeded.
This is my code:
from rich.console import Console
from rich.markdown import Markdown
from rich.panel import Panel
import…

javispado
- 1
- 1
0
votes
0 answers
Change default colors in typer + rich library
i'm creating CLI and using typer(0.9.0) with rich (13.5.2).
Do you know how to change default colors?
The colors which i'm seeing in my console are very bright... :
regards

qazah
- 63
- 1
- 9
0
votes
1 answer
Python rich not formatting markup in custom exception
I'm trying to add formatting in a custom exception with rich. The same string when printed as a string works (the carat becomes bold red), but as an exception it doesn't. It's stranger because the foo=123 gets highlighted automatically in both…

suvayu
- 4,271
- 2
- 29
- 35
0
votes
0 answers
Disable rich help panel in Typer
I'm trying to use typer to build a CLI application. I'm also using rich to do some formatting. However having rich installed leads to typer using rich_help_panel. I would like to disable that. I would prefer the normal formatting of the help…

suvayu
- 4,271
- 2
- 29
- 35
0
votes
1 answer
How do I prevent the "Rich" Python library from printing "new_val" on startup?
The first time an attribute of rich is executed, new_val get's printed onto my console. This happens on quite a few attributes I have tried. For example, simply executing
from rich.console import Console
would result in new_val being printed.
The…

Squarish
- 169
- 6
0
votes
1 answer
rich progress bar not showing correct results with sockets file sharing
I have two scripts sender.py and reciever.py. i got the idea of calculating chunks recieved and chunks sent from here.
but i got some different results. the progress bar completed 100% instantly as shown here. am i doing something…

Sajjad Ali
- 91
- 2
- 10
0
votes
0 answers
MicroStrategy Text Later Dynamic Data
How can I call data that will be displayed in Dosier as dynamic data within a Text Layer, so text coming from a database field versus entering the value?
Use case is we have clients where the same value is called two different things, but would like…

Jacob
- 1
0
votes
0 answers
How do I use this custom logger in my ini file loaded with fileConfig?
I configure logging with ini files and I want to continue to do this, but now I want to use a custom logger.
I can't find examples of using rich console's custom logger with fileConfig: https://rich.readthedocs.io/en/stable/logging.html
This is my…

red888
- 27,709
- 55
- 204
- 392
0
votes
0 answers
Colorful notebook output with rich library
May someone tell me how to set again that colorful output from jupyter notebook without using rich.print? I use VSCode.
I've got this feature with kedro=0.18.4 and lost with kedro=0.18.5. Kedro requires rich as an dependency.
I think it was a…

matt91t
- 103
- 1
- 8
0
votes
0 answers
Font to support the output from python rich package
I am a new user of the python rich package, which displays very nice output in terminal, as shown in there galary.
However my terminal (mobaxterm) seems to not display the output nicely, especially for the emoji and box frames. I doubt that it is…

doraemon
- 2,296
- 1
- 17
- 36
0
votes
0 answers
How to make a status be shown only once, before downloading video using yt-dlp, and constantly undating the status above?
I want to create a script which will download videos using yt-dlp, and show it beatifully in console.
c = Console()
with c.status("[bold blue]Downloading video...", spinner='bounce') as status:
with yt_dlp.YoutubeDL(ydl_opts) as ydl:
…

FanaticExplorer
- 21
- 5
0
votes
0 answers
Detect when the Python interpreter enters IPython?
I have code that uses a rich live display. Sometimes I IPython.embed in that code, but the display keeps updating. I would like to stop the display before the embed and restart if the embed exists. Is there a clean way to do this?

Erotemic
- 4,806
- 4
- 39
- 80
0
votes
0 answers
python textual / rich: include python console on bottom half of window
I would like to start using textual for GUI building. I would like the python command window (that shows python output with print() and accepts input()) on the bottom half of the window.

likethevegetable
- 264
- 1
- 4
- 17