sigma.standard
sigma.standard is a python validation framework.
sigma.standard is based on sigma.core.
sigma.standard supports the following validation logics.
- Type(type)
- White List(white_list)
- Black List(black_list)
- Not None(noneable)
- String Length(length)
- Size(size)
- Regular Expression(match, search)
Example
from sigma.core import Model
from sigma.standard import Field
class User(Model):
id = Field(type=int, size=(5, 10))
password = Field(type=str, length=(8, 15))
user = User()
user.id = 20 # raise OverMaxError
user.password = 10 # raise InvalidTypeError
Install
$ pip install sigma.standard
Dependencies
License
sigma is available under the MIT License.