Portafilter provides powerful and simple data validation functionality.
Project description
Portafilter
Powerful and simple data validation functionality.
Portafilter provides several different approaches to validate your application's incoming data. It's zero dependencies and easy to use.
Help
See documentation for more details.
Installation
It's on PyPI and all you need to do is:
pip install portafilter
A Simple Example
from portafilter import Validator
validator = Validator(
{
'name': 'Flat White',
'description': 'A Flat White is a coffee drink consisting of espresso with microfoam ',
'ingredients': [
{
'name': 'Espresso',
},
{
'name': 'Steamed Milk',
}
],
},
{
'name': 'required',
'description': 'required|max:255',
'ingredients': 'required|list',
'ingredients.*.name': 'required|string',
}
)
if validator.fails():
# The data is not valid
print(validator.errors())
# The data is valid
To see all the features, visit portafilter.dev
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
portafilter-1.0.1.tar.gz
(20.4 kB
view details)
Built Distribution
File details
Details for the file portafilter-1.0.1.tar.gz
.
File metadata
- Download URL: portafilter-1.0.1.tar.gz
- Upload date:
- Size: 20.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ead1459315cdfa6d374ac139b130df09585911467d6fd4c34077a91841dfa596 |
|
MD5 | 61918b8d305ef3cd343ec6fb7fdd421c |
|
BLAKE2b-256 | 79c8478bf7e4f84cfc4f1bf783c290321c6721b57aa6e003f2fdd222294f0e8b |
File details
Details for the file portafilter-1.0.1-py3-none-any.whl
.
File metadata
- Download URL: portafilter-1.0.1-py3-none-any.whl
- Upload date:
- Size: 32.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 153bc9caf6ecfcedee5c549d56adc18d096258e527e3dab74f05ab6a41d54f3a |
|
MD5 | 6cb41897a92d5ac6c369b90d3f337eea |
|
BLAKE2b-256 | e1150db43b690b70d25a1bcc735627e26734acb4f4370a54e9ced2ebff5fa617 |