File: index.rst

package info (click to toggle)
python-cerberus 1.3.7-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 7,532 kB
  • sloc: python: 5,239; makefile: 130
file content (60 lines) | stat: -rw-r--r-- 1,585 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
Welcome to Cerberus
===================

    ``CERBERUS``, n. The watch-dog of Hades, whose duty it was to guard the
    entrance; everybody, sooner or later, had to go there, and nobody wanted to
    carry off the entrance.
    - *Ambrose Bierce, The Devil's Dictionary*

Cerberus provides powerful yet simple and lightweight data validation
functionality out of the box and is designed to be easily extensible, allowing
for custom validation. It has no dependencies and is thoroughly.

At a Glance
-----------
You define a validation schema and pass it to an instance of the
:class:`~cerberus.Validator` class: ::

    >>> schema = {'name': {'type': 'string'}}
    >>> v = Validator(schema)

Then you simply invoke the :meth:`~cerberus.Validator.validate` to validate
a dictionary against the schema. If validation succeeds, ``True`` is returned:

::

    >>> document = {'name': 'john doe'}
    >>> v.validate(document)
    True


Table of Contents
-----------------
.. toctree::
    :maxdepth: 2

    Installation <install>
    Usage <usage>
    schemas
    validation-rules
    normalization-rules
    errors
    Extending <customize>
    Contributing <contribute>
    API <api>
    FAQ <faq>
    external_resources
    changelog
    upgrading
    authors
    contact
    license

Copyright Notice
----------------
Cerberus is an open source project by `Nicola Iarocci
<https://nicolaiarocci.com>`_. See the original `LICENSE
<https://github.com/pyeve/cerberus/blob/1.3.x/LICENSE>`_ for more
information.

.. _`Cerberus campaign on Patreon`: https://www.patreon.com/nicolaiarocci