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
Links
Stable |
|||
Development |
|||
Source Code |
|||
Issue tracker |
|||
Compatibility Matrix
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)
| 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
|