Common Schema Patterns
Reusable validation schemas for typical data structures.
Define reusable schemas for common record types.
from gdtest_sec_index_hero import validate
user_schema = {'name': str, 'age': int}
event_schema = {'type': str, 'timestamp': float}
assert validate(user_schema, {'name': 'Alice', 'age': 30})
assert validate(event_schema, {'type': 'click', 'timestamp': 1.0})