Skip to main content

Validator is a library that provides an improved handling of validation.

The following parts of validation are handled;

  • state

  • transistion

Installation

pip install etools-validator

Setup

Add validator to INSTALLED_APPS in settings.py .. code-block:: python

INSTALLED_APPS = (

… ‘etools_validator’,

)

Usage

Use validator in views

from validator.mixins import ValidatorViewMixin

class ExampleView(ValidatorViewMixin, ListCreateAPIView):
    ...

Contributing

Environment Setup

To install the necessary libraries

$ pip install -r requirements/dev.txt

Coding Standards

See PEP 8 Style Guide for Python Code for complete details on the coding standards.

To run checks on the code to ensure code is in compliance

$ flake8 .

Testing

Testing is important and tests are located in tests/ directory and can be run with;

$ coverage run manage.py test

Coverage report is viewable in build/coverage directory, and can be generated with;

$ coverage html

Compatibility Matrix

https://travis-matrix-badges.herokuapp.com/repos/unicef/etools-validator/branches/develop

Metadata

Release files for etools-validator 0.5.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for etools-validator 0.5.1
File Size Uploaded
etools-validator-0.5.1.tar.gz 23.4 kB Details

Release files / etools-validator-0.5.1.tar.gz

Download URL etools-validator-0.5.1.tar.gz
Size 23.4 kB
Tags Source
SHA-256 checksum
How to use checksums
158f7fdaa114487a4e90addde0c227cf83b8dd4adbb1ad7dd911b88987e699b0
BLAKE2b-256 checksum
How to use checksums
b4387f1b517b51428f723ec38b5dddf9efbb887f0e49b3515f7949439277d210
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.8.10

Release history Release notifications | RSS feed

This release

0.5.1 This release

1 release file

0.5

2 release files

0.3.4

2 release files

0.3.3

2 release files

0.3.2

1 release file

0.3.1

1 release file

0.2.1

1 release file

0.2.0

1 release file

0.1.0

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page