vtjson
Functions
|
Compiles a schema. |
|
Transforms a schema into a genuine Python type. |
|
Validates the given object against the given schema and changes its type accordingly. |
|
Validates the given object against the given schema. |
Classes
|
Modifies the treatement of the previous arguments in an Annotated schema. |
|
Matchess anything. |
|
This represents a dictionary with a least one key among a collection of keys. |
|
This represents an dictionary with at most one key among a collection of keys. |
|
This matches the real numbers that are close to x in the sense of math.isclose. |
|
Base class for objects that are comparable with each other. |
The result of compiling a schema. |
|
|
An object matches the schema complement(schema) if it does not match schema. |
|
Args is a list of tuples (if_schema, then_schema). |
|
Matches an ISO 8601 date. |
|
Without argument this represents an ISO 8601 date-time. |
|
This matches the integers x such that (x - remainder) % divisor == 0. |
|
Checks if the object is a valid domain name. |
|
Checks if the object is a valid email address. |
|
d is a dictionary {"field1": schema1, ...}. |
|
Applies filter to the object and validates the result with schema. |
|
Schema that only matches floats. |
|
This checks if object >= lb. |
|
Unix style filename matching. |
|
This checks if object > lb. |
|
If the object matches the if_schema then it should also match the then_schema. |
|
An object matches the schema intersect(schema1, ..., schemaN) if it matches all the schemas schema1, ..., schemaN. |
|
This checks if lb <= object <= ub, provided the comparisons make sense. |
|
Matches ip addresses of the specified version which can be 4, 6 or None. |
|
This represents a dictionary containing all the keys in a collection of keys. |
|
An object matches the schema lax(schema) if it matches schema when validated with strict=False. |
|
This checks if object <= ub. |
|
This checks if object < ub. |
|
Checks if a buffer (for example a string or a byte array) has the given mime type. |
|
Matches nothing. |
|
A deprecated alias for float. |
|
This represents a dictionary with exactly one key among a collection of keys. |
|
Make a key in a Mapping schema optional. |
|
An object matches the schema protocol(schema, dict=False) if schema is a class (or class like object) and its fields are annotated with schemas which validate the corresponding fields in the object. |
|
An object matches the schema quote(schema) if it is equal to schema. |
|
This matches the strings which match the given pattern. |
|
An object matches the schema set_label(schema, label1, ..., labelN, debug=False) if it matches schema, unless the schema is replaced by a different one via the subs argument to validate. |
|
An object matches the schema set_name(schema, name) if it matches schema, but the name argument will be used in non-validation messages. |
|
Matches the objects (which support len() such as strings or lists) whose length is in the interval [lb, ub]. |
|
An object matches the schema strict(schema) if it matches schema when validated with strict=True. |
|
Matches an ISO 8601 time. |
|
An object matches the schema union(schema1, ..., schemaN) if it matches one of the schemas schema1, ..., schemaN. |
|
Matches valid urls. |
|
Base class for schemas that refer to other schemas. |
Exceptions
Raised if a schema contains an error. |
|
Raised if validation fails. |