partis.schema.prim.str_prim module#
- class StrPrimDeclared(name=None, module=None, module_set=None, doc=None, **kwargs)[source]#
Bases:
SchemaPrimDeclared
- class StrPrim(name=None, module=None, module_set=None, doc=None, **kwargs)[source]#
Bases:
SchemaPrimPrimitive for string values
- Parameters:
Cased characters are converted to given case
None (default) : Cased characters are not altered
’lower’ : Cased characters are converted to their lower-case equivalent
’upper’ : Cased characters are converted to their upper-case equivalent
strip¶ (NoneType | bool) – Strips leading and trailing white-space if
True.Validates a string using a regular expression (Python syntax)
Note
The pattern is only matched to non-empty strings. See the nonempty argument to only allow string that have at least one character.
nonempty¶ (NoneType | bool) – Only non-empty strings are valid if
True. If the value is optional, the no-value or a value ofNoneis still considered valid.**kwargs¶ (arguments passed to
SchemaPrim) –