Skip to main content

Validator

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 Provenance Actions
etools-validator-0.5.1.tar.gz 23.4 kB Without provenance Details for etools-validator-0.5.1.tar.gz

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

Security for etools-validator 0.5.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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