Welcome to Qval’s documentation!

Qval is a query parameters validation library. It is built using context managers and designed to work with Django Rest Framework, but also supports Django, Flask and Falcon.

Qval can validate incoming query parameters, convert them to python objects and automatically report errors to the client.

Get started

In order to use Qval in your project, install it with pip:

$ pip install qval

The usage is as simple as:

>>> from qval import validate
>>> with validate({"integer": "10"}, integer=int) as p:
...     print(type(p.integer) is int, p.integer)
True 10

For more verbose and clear examples refer to Basic usage and examples in the github repository.