Learn how to install DontTrust to your python project using either pip or

Installing using pip

Create a virtualenv first (Optional):

python3 -m venv venv
source venv/bin/activate
# Windows
# venv\Scripts\activate

Install with pip using

pip install donttrust


  1. Clone the repo (requires git installed):
git clone donttrust
cd donttrust
  1. Install
python3 install


Now, you can use the library

from donttrust import DontTrust, Schema

trust = DontTrust(test=Schema().string())

data = trust.validate({"test": "hello"})
# data["test"] == hello

data2 = trust.validate(test=1234) # Exception raised

And that's how easy it is to get setup with form validation

Edit this page on Github