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 hashes)
Built Distribution
Close
Hashes for portafilter-1.0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 153bc9caf6ecfcedee5c549d56adc18d096258e527e3dab74f05ab6a41d54f3a |
|
MD5 | 6cb41897a92d5ac6c369b90d3f337eea |
|
BLAKE2b-256 | e1150db43b690b70d25a1bcc735627e26734acb4f4370a54e9ced2ebff5fa617 |