Skip to main content

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


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.0.tar.gz (20.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

portafilter-1.0.0-py3-none-any.whl (32.4 kB view details)

Uploaded Python 3

File details

Details for the file portafilter-1.0.0.tar.gz.

File metadata

  • Download URL: portafilter-1.0.0.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

Hashes for portafilter-1.0.0.tar.gz
Algorithm Hash digest
SHA256 7aab19cccddbca6fd16337b0aae48e15d5dedeaaa2ec6e5d72328905e6e2c9c7
MD5 5c7c736dbb5f82df318c7c650462b36d
BLAKE2b-256 5cb4a554aa1ab1e10e160bdb00735b387eee313c8f021fabfad8db1a309b7bd5

See more details on using hashes here.

File details

Details for the file portafilter-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: portafilter-1.0.0-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

Hashes for portafilter-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 7fce7478d65bf0f268c6dfc04924c696ea17c4336744709612e99136cd073c36
MD5 6afe6e2d3904812663cdf222e1bb994a
BLAKE2b-256 5f40e141b872d417c44b506ea324ff2d1ffe26901ade8eadca809cd5cb4ba6dc

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page