How do I obfuscate secret strings in rich console output?

Viewed 31

I want to obfuscate secret strings so they are not dumped to the console.

Python's logger has formatters so I could use that for this: Mask out sensitive information in python log

But how do I do this with rich console? How can I pass rich a list of strings to obfuscate (replace with "******") when calling console.print().

I'm sure this is possible, but I can't find any examples for how to transform output like this with rich.

0 Answers
Related