Validators
_Validator
Bases: abc.ABC
Base class of all validator classes.
Source code in pyflp/_validators.py
23 24 25 26 27 28 29 30 31 |
|
__repr__()
Source code in pyflp/_validators.py
26 27 |
|
validate(value)
abstractmethod
Source code in pyflp/_validators.py
29 30 31 |
|
_BoolValidator
Bases: _OneOfValidator
Validates whether a value equals True
or False
.
Source code in pyflp/_validators.py
51 52 53 54 55 56 57 58 59 60 61 62 |
|
__init__()
Source code in pyflp/_validators.py
54 55 |
|
__repr__()
Source code in pyflp/_validators.py
57 58 |
|
validate(value)
Source code in pyflp/_validators.py
60 61 62 |
|
_BytesValidator
Bases: _BytesStrValidatorBase
Validates the type and size of a bytes
object.
Source code in pyflp/_validators.py
159 160 161 162 163 164 165 |
|
validate(value)
Source code in pyflp/_validators.py
162 163 164 165 |
|
_BytesStrValidatorBase
Bases: _Validator
, abc.ABC
Base class for _BytesValidator
and _StrValidator
.
Source code in pyflp/_validators.py
136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 |
|
__maxsize = maxsize
instance-attribute
__minsize = minsize
instance-attribute
__init__(minsize=None, maxsize=None)
Source code in pyflp/_validators.py
139 140 141 142 143 |
|
__repr__()
Source code in pyflp/_validators.py
145 146 |
|
validate(value)
Source code in pyflp/_validators.py
148 149 150 151 152 153 154 155 156 |
|
_ColorValidator
Bases: _Validator
Validates whether the type of value is colour.Color
.
Source code in pyflp/_validators.py
188 189 190 191 192 193 |
|
validate(value)
Source code in pyflp/_validators.py
191 192 193 |
|
_EnumValidator
Bases: _OneOfValidator
Validates whether a value exists in a particular enum
class.
Source code in pyflp/_validators.py
65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 |
|
__enum = enum
instance-attribute
__init__(enum)
Source code in pyflp/_validators.py
70 71 72 |
|
__repr__()
Source code in pyflp/_validators.py
74 75 |
|
validate(value)
Source code in pyflp/_validators.py
77 78 79 80 81 |
|
_FloatValidator
Bases: _IntFloatValidatorBase
Validates whether value is an float
and lies in a range, optionally.
Source code in pyflp/_validators.py
118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 |
|
__max = max_
instance-attribute
__min = min_
instance-attribute
__init__(min_=None, max_=None)
Source code in pyflp/_validators.py
121 122 123 124 125 |
|
validate(value)
Source code in pyflp/_validators.py
127 128 129 130 131 132 133 |
|
_OneOfValidator
Bases: _Validator
Validates whether a value exists in a given set of options.
Source code in pyflp/_validators.py
37 38 39 40 41 42 43 44 45 46 47 48 |
|
__options = options
instance-attribute
__init__(options)
Source code in pyflp/_validators.py
40 41 |
|
__repr__()
Source code in pyflp/_validators.py
43 44 |
|
validate(value)
Source code in pyflp/_validators.py
46 47 48 |
|
_IntFloatValidatorBase
Bases: _Validator
, abc.ABC
Base class for _IntValidator
and _FloatValidator
.
Source code in pyflp/_validators.py
84 85 86 87 88 89 90 91 92 |
|
__max = max_
instance-attribute
__min = min_
instance-attribute
__init__(min_, max_)
Source code in pyflp/_validators.py
87 88 89 |
|
__repr__()
Source code in pyflp/_validators.py
91 92 |
|
_IntValidator
Bases: _IntFloatValidatorBase
Validates whether value is an int
and lies in a range, optionally.
Source code in pyflp/_validators.py
95 96 97 98 99 100 101 102 103 104 105 106 107 108 |
|
__max = max_
instance-attribute
__min = min_
instance-attribute
__init__(min_=None, max_=None)
Source code in pyflp/_validators.py
98 99 100 |
|
validate(value)
Source code in pyflp/_validators.py
102 103 104 105 106 107 108 |
|
_StrValidator
Bases: _BytesStrValidatorBase
Validates the type and size of an str
object.
Source code in pyflp/_validators.py
168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 |
|
__mustascii = mustascii
instance-attribute
__init__(minsize=None, maxsize=None, mustascii=False)
Source code in pyflp/_validators.py
171 172 173 174 175 176 177 178 |
|
validate(value)
Source code in pyflp/_validators.py
180 181 182 183 184 185 |
|
_UIntValidator
Bases: _IntValidator
A specialization of _IntValidator
for validating positive integers.
Source code in pyflp/_validators.py
111 112 113 114 115 |
|
__init__(max_=None)
Source code in pyflp/_validators.py
114 115 |
|