Home Assistant Unofficial Reference 2024.12.1
homeassistant.helpers.redact Namespace Reference

Functions

_T _ValueT (_T data, Iterable[Any]|Mapping[Any, Callable[[_ValueT], _ValueT]] to_redact)
 
dict _ValueT (Mapping data, Iterable[Any]|Mapping[Any, Callable[[_ValueT], _ValueT]] to_redact)
 
str partial_redact (str|Any x, int unmasked_prefix=4, int unmasked_suffix=4)
 

Variables

string REDACTED = "**REDACTED**"
 

Detailed Description

Helpers to redact sensitive data.

Function Documentation

◆ _ValueT() [1/2]

_T homeassistant.helpers.redact._ValueT ( _T  data,
Iterable|  Mapping[Any][Any, Callable[[_ValueT],
_ValueT]]  to_redact 
)
private
Redact sensitive data in a dict.

Definition at line 38 of file redact.py.

◆ _ValueT() [2/2]

dict homeassistant.helpers.redact._ValueT ( Mapping  data,
Iterable[Any] | Mapping[Any, Callable[[_ValueT], _ValueT]]   to_redact 
)
private

Definition at line 32 of file redact.py.

◆ partial_redact()

str homeassistant.helpers.redact.partial_redact ( str | Any  x,
int   unmasked_prefix = 4,
int   unmasked_suffix = 4 
)
Mask part of a string with *.

Definition at line 13 of file redact.py.

Variable Documentation

◆ REDACTED

string homeassistant.helpers.redact.REDACTED = "**REDACTED**"

Definition at line 10 of file redact.py.