cerberus: Validate Python Data Against Schemas

cerberus: Validate Python Data Against Schemas

Summary

Cerberus is a lightweight Python library for checking data against schemas, with built-in type validation and extension points for custom rules. It suits applications that need reusable input validation without adding runtime dependencies.

At a glance

Language
Python
License
ISC
Stars
3.3k
Forks
248
Added to OSRepos
December 13, 2025
Last analyzed
October 3, 2026
View on GitHub

Topics

Click on any tag to explore related repositories

Use at your own risk

OSRepos shares public repositories for knowledge and discovery only. Any installation, execution, configuration, or use of code from these repositories is the user's own responsibility. Always review the repository, source code, dependencies, licenses, and security implications before running or installing anything. OSRepos is not responsible for issues, damages, or losses resulting from third-party repositories.

Overview

Cerberus lets Python applications define schemas and validate data against them, returning whether the data conforms. It addresses the common need to check structured input consistently, rather than scattering validation logic throughout application code.

It is designed to be lightweight and extensible: built-in checks cover common validation needs, while custom validation can be added when an application needs domain-specific rules. It is a fit for teams building Python services or tools that want schema-based validation without a dependency-heavy framework.

Key Features

  • Validates data against declarative schemas.
  • Provides built-in type checking and other base validation functionality.
  • Supports custom validation for application-specific rules.
  • Designed to be non-blocking and extensible.
  • Has no runtime dependencies, according to the project README.
  • Supports Python interpreters according to the project's interpreter support policy.

Use Cases

  • Validate request or configuration data in a Python application before processing it.
  • Check imported records against expected fields and types, helping data-processing scripts catch malformed input.
  • Share validation schemas across application components instead of duplicating checks.
  • Add domain-specific validation rules when built-in checks do not cover an application's requirements.

Project Facts

  • Language: Python
  • License: ISC
  • Stars: 3.3k
  • Forks: 248
  • Topics: data-validation, python
  • Archived: No

Getting Started

Install from PyPI:

pip install cerberus

See the README and documentation for schema syntax, customization, and testing details.

Considerations

Cerberus focuses on validation and does not claim to provide a complete application or data-modeling framework. The README describes interpreter support as a testing policy, so check the documentation and run the test suite on your target Python environment if compatibility is important. Custom requirements may need custom validation logic.

Source repository

Open the original repository on GitHub.

20 counted GitHub visits

View on GitHub

Related repositories

Similar repositories that may be relevant next.

OS
OSRepos

Analysis and discovery of open source repositories. Find interesting projects and follow their updates.

Monitor your website with YourWebsiteScore

OSRepos shares public repositories for knowledge and discovery only. Any installation, execution, configuration, or use of third-party repository code is at your own risk. Always review source code, dependencies, licenses, and security implications before running anything.

© 2025 OSRepos. Built with Nuxt 3 and lots of ❤️