credmark.dto.StrDTO
- class StrDTO(value, **_kwargs)[source]
Bases:
str
A DTO that can be used as an string output (or input) to a model. When used as a top-level DTO it is serialized as a dict with a
value
field{"value": "foobar"}
, otherwise it is serialized as a string.It can be used in python code as a normal string.
Methods
dict
schema
validate
- Parameters
value (str) –