Lightweight, extensible schema and data validation tool for Pythondictionaries.
Project description
Cerberus is a lightweight and extensible data validation library for Python.
>>> v = Validator({'name': {'type': 'string'}})
>>> v.validate({'name': 'john doe'})
True
Features
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
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 know 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.
Funding
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.
Documentation
Complete documentation is available at http://docs.python-cerberus.org
Installation
Cerberus is on PyPI, so all you need to do is:
$ pip install cerberus
Testing
Just run:
$ python setup.py 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:
$ pip install tox # first time only
$ tox
Contributing
Please see the Contribution Guidelines.
Copyright
Cerberus is an open source project by Nicola Iarocci. See the license file for more information.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file Cerberus-1.3.5.tar.gz
.
File metadata
- Download URL: Cerberus-1.3.5.tar.gz
- Upload date:
- Size: 29.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/4.0.2 CPython/3.11.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 81011e10266ef71b6ec6d50e60171258a5b134d69f8fb387d16e4936d0d47642 |
|
MD5 | 89b0d86218b601fec08296cfd55f0a64 |
|
BLAKE2b-256 | 07203ec65289ab0ccf5f41d38d103343f5b609263944238e299598aeba684a82 |
File details
Details for the file Cerberus-1.3.5-py3-none-any.whl
.
File metadata
- Download URL: Cerberus-1.3.5-py3-none-any.whl
- Upload date:
- Size: 30.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/4.0.2 CPython/3.11.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7649a5815024d18eb7c6aa5e7a95355c649a53aacfc9b050e9d0bf6bfa2af372 |
|
MD5 | 01b9b2415842b6f577c57c4e81752cc3 |
|
BLAKE2b-256 | fb17335e0a4daf5475ada5eaa74735f765cc088ace306fbfdd2f4c2285320cc3 |