Skip to main content

Validation Framework for Python3

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 Gladiator 0.7.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for Gladiator 0.7.0
File Size Uploaded
Gladiator-0.7.0.tar.gz 6.3 kB Details

Release files / Gladiator-0.7.0.tar.gz

Download URL Gladiator-0.7.0.tar.gz
Size 6.3 kB
Tags Source
SHA-256 checksum
How to use checksums
47560e65629b5269dc6464cb50b28cf439e395a0478d1ec5d30298955456fa40
BLAKE2b-256 checksum
How to use checksums
15fb2536bde29a440075bde7340af4d93f9fc19fbd92a2c08b60127185067e82
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

This release

0.7.0 This release

1 release file

0.6.9

1 release file

0.6.8

1 release file

0.6.7

1 release file

0.6.6

1 release file

0.6.5

1 release file

0.6.4

1 release file

0.6.3

1 release file

0.6.2

1 release file

0.6.1

1 release file

0.6

1 release file

0.5

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page