Flask-Gladiator-0.1
توضیحات
Gladiator is a Data Validation Framework for Python3 (Flask Plugin)
| ویژگی | مقدار |
|---|---|
| سیستم عامل | OS Independent |
| نام فایل | Flask-Gladiator-0.1 |
| نام | Flask-Gladiator |
| نسخه کتابخانه | 0.1 |
| نگهدارنده | [] |
| ایمیل نگهدارنده | [] |
| نویسنده | László Andrási |
| ایمیل نویسنده | mail@laszloandrasi.com |
| آدرس صفحه اصلی | https://github.com/laco/flask-gladiator |
| آدرس اینترنتی | https://pypi.org/project/Flask-Gladiator/ |
| مجوز | BSD |
*********
Gladiator
*********
Validation Framework for Python3 (Flask Extension)
A quick example
===============
A registration form accepts this data structure::
valid_test_data = {
'email': 'test@example.com',
'pw': 'password123',
'name': 'Test Username',
'birth_year': 1984
}
The validation process can be::
import gladiator as gl
registration_form_validator = (
('email', gl.required, gl.format_email),
('pw', gl.required, gl.length_min(5)),
('name', gl.required, gl.type_(str)),
('birth_year', gl.required, gl.type_(int), gl.value_max(2014 - 18))
)
result = gl.validate(registration_form_validator, valid_test_data)
assert result.success is True
نحوه نصب
نصب پکیج whl Flask-Gladiator-0.1:
pip install Flask-Gladiator-0.1.whl
نصب پکیج tar.gz Flask-Gladiator-0.1:
pip install Flask-Gladiator-0.1.tar.gz