Guard is a fluent argument validation library that is intuitive, fast and extensible.
Project description
Python Guard
Guard is a fluent argument validation library that is intuitive, fast and extensible.
Installing
To run this project, I advise to user virtualenv. The project requires python == 3.6.
mkvirtualenv -p $(which python3) pyguard
And
python setup.py install
Usage
Here's some examples how to use this package:
from guard import Guard
Guard.NotNull(None) # Not Null Guard without parameter name and message
Guard.NotLessThan(-1, 0, "age") # Not Less Than Guard with parameter name and without custom message
Guard.NotAny([], "ags_lst", "This list must be at least one element.") # Not Any Guard with custom message
Running the tests
pytest -v tests
Authors
- Joao Teixeira - joaoteixeira88
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
File details
Details for the file python-parameter-guard-0.1.0.tar.gz.
File metadata
- Download URL: python-parameter-guard-0.1.0.tar.gz
- Upload date:
- Size: 6.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/53.0.0 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.6.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
423805dce1cfea998acbe8cd84878248786568037ed8020377307c2ab279af56
|
|
| MD5 |
08754ee31e3ab4fb42aa536e2ce490b1
|
|
| BLAKE2b-256 |
38011110a14911f93aab7159548382807e0e923f9247e899164893ef485e7907
|