Awesome Open Source
Awesome Open Source

Cerberus |latest-version|

|build-status| |python-support| |black|

Cerberus is a lightweight and extensible data validation library for Python.

.. code-block:: python

>>> v = Validator({'name': {'type': 'string'}})
>>> v.validate({'name': 'john doe'})


Cerberus provides type checking and other base functionality out of the box and is designed to be non-blocking and easily and widely extensible, allowing for custom validation. It has no dependencies, but has the potential to become yours.

Versioning & Interpreter support

The Cerberus 1.x versions can be used with Python 2 while version 2.0 and later rely on Python 3 features.

Starting with Cerberus 1.2, it is maintained according to semantic versioning_. So, a major release sheds off the old and defines a space for the new, minor releases ship further new features and improvements (you now the drill, new bugs are inevitable too), and micro releases polish a definite amount of features to glory.

We intend to test Cerberus against all CPython interpreters at least until half a year after their end of life_ and against the most recent PyPy interpreter as a requirement for a release. If you still need to use it with a potential security hole in your setup, it should most probably work with the latest minor version branch from the time when the interpreter was still tested. Subsequent minor versions have good chances as well. In any case, you are advised to run the contributed test suite on your target system.


Cerberus is an open source, collaboratively funded project. If you run a business and are using Cerberus in a revenue-generating product, it would make business sense to sponsor its development: it ensures the project that your product relies on stays healthy and actively maintained. Individual users are also welcome to make a recurring pledge or a one time donation if Cerberus has helped you in your work or personal projects.

Every single sign-up makes a significant impact towards making Eve possible. To learn more, check out our funding page_.


Complete documentation is available at


Cerberus is on PyPI_, so all you need to do is:

.. code-block:: console

$ pip install cerberus


Just run:

.. code-block:: console

$ python test

Or you can use tox to run the tests under all supported Python versions. Make sure the required python versions are installed and run:

.. code-block:: console

$ pip install tox  # first time only
$ tox


Please see the Contribution Guidelines_.


Cerberus is an open source project by Nicola Iarocci. See the license file for more information.

.. _Contribution Guidelines: .. _end of life: .. _funding page: .. _license: .. _Nicola Iarocci: .. _PyPI: .. _semantic versioning:

.. |black| image:: :alt: Black code style :target: .. |build-status| image:: :alt: Build status :target: .. |latest-version| image:: :alt: Latest version on PyPI :target: .. |license| image:: :alt: Software license :target: .. |python-support| image:: :target: :alt: Python versions

Get A Weekly Email With Trending Projects For These Topics
No Spam. Unsubscribe easily at any time.
python (51,035
data-validation (16

Find Open Source By Browsing 7,000 Topics Across 59 Categories