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
Release files for Flask-Gladiator 0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| Flask-Gladiator-0.1.tar.gz | 2.5 kB | Details |
Release files / Flask-Gladiator-0.1.tar.gz
| Download URL | Flask-Gladiator-0.1.tar.gz |
|---|---|
| Size | 2.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ae8901bef77100312037d4b2b262dcc0bab92d8ce4d34b088f5bffd8dd0d2395
|
|
BLAKE2b-256 checksum How to use checksums |
10ea3894bb1d168485b1beeb0e072b3f4ec5fc3e63d80b79df63821b9c37f9a4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |