request_format

Provides functionality for handling the request format.

Examples

If you want to validate a dictionary against the request format:

>>> from data_formats import request_format
>>> example = {}
>>> request_format.validate(example)
Traceback (most recent call last):

data_formats.request_format.request_format.RequestValidationError

exception data_formats.request_format.request_format.RequestValidationError[source]

The request format instance failed to validate against the SCHEMA.

data_formats.request_format.request_format.validate(instance: dict) None[source]

Validate the instance against the schema.

Parameters:

instance – The potential instance of the schema

Raises:

ValidationError – the instance does not match the schema