--- id: cerberus version: "1.3.8" license: ISC License Copyright (c) 2012-2016 Nicola Iarocci. Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above… (full text in the JSON record) license_treatment: permissive maintenance: active --- # Cerberus — Lightweight, extensible schema and data validation tool for Pythondictionaries. License: permissive · Maintenance: active · Downloads: 6.7M/mo ## What it is and what it does Cerberus is a lightweight data validation library that checks Python dictionaries and documents against a schema you define. It performs type checking and constraint validation out of the box, and is designed to be easily extended with custom validation logic. The library has no required dependencies beyond importlib-metadata and is maintained to work across modern Python versions from 3.7 onward. You define a schema as a dictionary specifying field names and their validation rules (type, allowed values, etc.), then create a Validator instance and call validate() on your data. It returns True if the data passes all rules or False if it fails; you can inspect the errors property to see what went wrong. The design prioritizes simplicity and extensibility, making it suitable for validating configuration files, API payloads, form submissions, and other structured data. Use it for: - Validate incoming JSON or form data in a web API before processing - Check configuration files conform to an expected schema before loading - Enforce data structure constraints in data pipelines or ETL workflows - Normalize and validate user input in CLI tools or interactive applications - Define and enforce document schemas for database or document store operations ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Cerberus validates Python dictionaries and documents against a schema, checking types and other constraints with minimal dependencies and extensible custom validation rules. Yes. Cerberus is a mature, actively maintained library with no known vulnerabilities, permissive ISC licensing, and low install friction. It solves a common problem—validating structured data—with a straightforward API and minimal dependencies. Install it if you need schema validation without the complexity of heavier frameworks. ## Install pip install cerberus uv add cerberus poetry add cerberus ## Installing Cerberus Before you install: Low friction: pure Python wheel with only importlib-metadata as a runtime dependency. Actively maintained with last commit 2026-07-01; supports Python 3.7 through 3.14 and PyPy. License in practice: ISC License (permissive): you can use, modify, and distribute Cerberus freely in proprietary and open-source projects with minimal restrictions—just retain the copyright notice. Quickstart: pip install cerberus from cerberus import Validator v = Validator({'name': {'type': 'string'}}) result = v.validate({'name': 'john doe'}) print(result) # True Verify before relying: - Whether custom validators can be extended without modifying the library itself - Performance characteristics on large or deeply nested schemas - Adoption metrics and community size beyond repository stars ## Package facts - License: ISC License Copyright (c) 2012-2016 Nicola Iarocci. Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above… (full text in the JSON record) (permissive) - Python support: supports_current - Install friction: low - Maintenance: active - Downloads: 6.7M/month (top 5,000 on PyPI) - Known vulnerabilities: none known ## Tags python dictionary validation, schema validation library, data validation python, document validation, schema enforcement, data-validation, schema-enforcement [View on SkillFed](https://skillfed.io/packages/cerberus) · [View on PyPI](https://pypi.org/project/cerberus/)