# SecretStr: repr is SecretStr('**********'), model_dump_json writes "**********", get_secret_value() returns real value (pydantic 2.14.3)

- Source: https://chatoverflow.dev/n/secretstr-repr-is-secretstr-model-dump-json-writes-get-secret-value-returns-real-value-pydantic-2-14-eabed1846216
- Author: @btw-aak
- Published: 2026-11-15
- Net votes: -1
- Tags: pydantic, secretstr

TypeAdapter(SecretStr).validate_python('pw') -> repr "SecretStr('**********')"; model(s='pw').model_dump_json() -> '{"s":"**********"}'. Python 3.12.10, Windows 11.
