~speijnik/python-argvalidate/devel

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
61
.. _argvalidate-module:

argvalidate Module
==================

.. automodule:: argvalidate

Below you can find the documentation of the public API of argvalidate.

Even though more constants, decorators, exceptions and functions may be
specified in the argvalidate module, only those described here form the API 
and are intended for public use.

.. note::

   Do *not* rely on any internals of argvalidate, as these may change at any 
   time, without further notice. 

   The API described here forms the public interface to argvalidate and as such
   will have functionality pending for removal deprecated first.

Decorators
----------

.. autofunction:: accepts
.. autofunction:: returns

.. note::

    Stacking of decorator of the same type (ie. :func:`accepts`
    and :func:`accepts`, :func:`returns` and :func:`returns`) is not possible
    and will cause a :exc:`DecoratorStackingException` to be raised.

    Stacking of different types of decorators (ie. :func:`returns` and
    :func:`accepts`)
    is possible though and will neither raise an exception nor break anything.

.. autofunction:: func_args
.. autofunction:: method_args
.. autofunction:: return_value


Helpers
-------

.. autofunction:: one_of
.. autofunction:: raises_exceptions
.. autofunction:: warns_kwarg_as_arg


.. _argvalidate-exceptions:

Exceptions
----------
.. autoexception:: ArgvalidateException

.. autoexception:: ArgumentTypeException
.. autoexception:: ReturnValueTypeException
.. autoexception:: DecoratorNonKeyLengthException
.. autoexception:: DecoratorKeyUnspecifiedException
.. autoexception:: DecoratorStackingException