semvec/pypi-packages huggingface dataset:
django-payload-validator 1.0.1
validator for django payload
License: MIT
Keywords: django payload validator intended audience is dev

# Django payload validator
This package can validate data provided as payload in request body. This is similar to django forms, but only difference being this works on json data provided throuogh body of a request rather than HTML forms.

### installation

- #### from pypi
   - ```pip install django-payload-validator```
- #### from this github repo
   - ```pip install -e git+https://github.com/gladsonvm/django_payload_validator.git#egg=django_payload_validator```

### Usage

```
class TeamCreateView(BaseValidatorView):
    model = <model>
    validation_rule = <validation_rule>
```

### Example

```
class TeamCreateView(BaseValidatorView):
    model = Team
    validation_rule = create_team
```

### Concepts:

- ##### validation_rule
   - A validation rule defines all fields those are meant to be validated.
   - Validation rule is a dictionary which defines 
      * fields
        * all fields those are meant to be validated as a dict. Each fields must define its `type`. If a field is mandatory, then set `required` param to true in field declaration. 
      * auto populated fields
        * Fields those are not obtained from request data and must be updated in database.
      * excluded fields
        * Fields that should not be displayed in response. 
      
   example:
   ```
   create_team = {
    'fields': {
        'name': {'type': str, 'required': True},
        'description': {'type': str, 'required': True},
        'team_type': {'type': str, 'required': True, 'allowed_values': ['tech', 'management', 'business', 'marketing']},
        'members': {'type': list}
        },
    'auto_populate_fields': {'created_by': 'request.user', 'last_updated_by': 'request.user'},
    'excluded_fields': ['members']
    }
   ```
woger 4.1.3
Workspace manager library
License: MIT
Keywords: woger workspace manager directory structure version control

=====
Woger
=====

|pipeline-status|
|test-coverage|
|docs-status|
|pypi-version|
|pypi-python-versions|
|license|

Workspace manager library

Why woger?
==========

Woger allows you to

- easily create directory structure
- manage multiple versions of your directories
- track the state of each workspace
- transition from one version to another

Documentation
=============

Woger documentation at readthedocs: http://woger.rtfd.io

.. |pipeline-status| image:: https://gitlab.com/grihabor/woger/badges/master/pipeline.svg
   :target: https://gitlab.com/grihabor/woger/commits/master

.. |test-coverage| image:: https://gitlab.com/grihabor/woger/badges/master/coverage.svg
   :target: https://gitlab.com/grihabor/woger/commits/master

.. |pypi-version| image:: https://img.shields.io/pypi/v/woger.svg 
   :target: https://pypi.python.org/pypi/woger

.. |license| image:: https://img.shields.io/pypi/l/woger.svg 
   :target: https://pypi.python.org/pypi/woger

.. |pypi-python-versions| image:: https://img.shields.io/pypi/pyversions/woger.svg
   :target: https://pypi.python.org/pypi/woger

.. |docs-status| image:: https://readthedocs.org/projects/woger/badge/?version=latest
   :target: https://woger.readthedocs.io/en/latest/?badge=latest