Installation

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


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

Using setup.py

  1. Clone the repo (requires git installed):
git clone https://github.com/arnu515/donttrust.git donttrust
cd donttrust
  1. Install
python3 setup.py install

Use

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