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
Release files for python-parameter-guard 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| python-parameter-guard-0.1.0.tar.gz | 6.4 kB | Details |
Release files / python-parameter-guard-0.1.0.tar.gz
| Download URL | python-parameter-guard-0.1.0.tar.gz |
|---|---|
| Size | 6.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
423805dce1cfea998acbe8cd84878248786568037ed8020377307c2ab279af56
|
|
BLAKE2b-256 checksum How to use checksums |
38011110a14911f93aab7159548382807e0e923f9247e899164893ef485e7907
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is 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
|