Skip to main content

Python implementation of our validation library

Project description

Validation library

Build Status Coverage Status GitHub PyPI PyPI - Python Version

Installation

  • Install from Pypi:

    $ pip install moveax-validation
            --- or ---
    $ poetry add moveax-validation
    

Usage

  • Simple example:

    >>> from validation import ValidatorFactory
    
    >>> data = ['foo', 'bar']
    >>> schema = {
        'elements': {
            'rules': ['minlen:3']
            'type': 'string'
        },
        'rules': ['maxlen:3'],
        'type': 'array'
    }
    >>> validator = ValidatorFactory.make(schema)
    >>> validator.validate(data)
    

Testing

  • Run the test suite with:

    $ poetry run coverage run unit.py
    

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

moveax-validation-2.0.0.tar.gz (14.5 kB view hashes)

Uploaded Source

Built Distribution

moveax_validation-2.0.0-py3-none-any.whl (34.0 kB view hashes)

Uploaded Python 3

Supported by

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