Form validation library for python
Project description
DontTrust
Don't trust your users! Form validation library for Python.
Quick install
pip install donttrust
Usage
Donttrust is not limited to any framework and has no dependencies. Just import it and you're good to go!
# Example usage
from donttrust import DontTrust, Schema, ValidationError
trust = DontTrust(username=Schema().string().required().alphanum(),
password=Schema().string().required(),
remember_me=Schema().boolean().default(False))
try:
data = trust.validate(username="hello123", password="abcdefg")
# data["username"], data["password"] ...
except ValidationError as e:
print(e.field, e.message)
# Other error handling
For more info and examples, visit the docs
Development
- Clone or fork this repo
- Make your changes
Note: Do NOT change the version number in
setup.py. I'll do that myself. - Run the tests in the
/testsdirectory (Done automatically with Github Actions) - PR and away!
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file donttrust-0.1.5.tar.gz.
File metadata
- Download URL: donttrust-0.1.5.tar.gz
- Upload date:
- Size: 8.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.6.0 importlib_metadata/4.8.2 pkginfo/1.8.0 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.10.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7c9c3cdbb7e3f10574b7752435e141c930c438f77ff1e34567892ada2909eeba
|
|
| MD5 |
f9d217a920544b5f6f055e35eed09df9
|
|
| BLAKE2b-256 |
ad953fe7475c41996bc42458b0733f9ab1dd921c7597503e199497ed29f413fd
|
File details
Details for the file donttrust-0.1.5-py3-none-any.whl.
File metadata
- Download URL: donttrust-0.1.5-py3-none-any.whl
- Upload date:
- Size: 8.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.6.0 importlib_metadata/4.8.2 pkginfo/1.8.0 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.10.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bc2e81b2dbabf30665f5b876df3807c5b101d4cdd8ae4a4d6ca00c1ab3e4e8f4
|
|
| MD5 |
f6bf9ddf3259ba5040282f80f158f3a8
|
|
| BLAKE2b-256 |
3fe24970d9722c576793efaf129d0a339d802cd5b1bc46611bceb136b6b0c063
|