Metadata-Version: 2.4
Name: cerberus-core
Version: 0.1.1
Summary: Shared utilities for the Cerberus monitoring ecosystem
Project-URL: Homepage, https://github.com/gpotrock/cerberus
Project-URL: Repository, https://github.com/gpotrock/cerberus.git
Project-URL: Issues, https://github.com/gpotrock/cerberus/issues
Author: Griffin Potrock
License-Expression: MIT
Keywords: analytics,monitoring,sanitization,security
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: System :: Monitoring
Requires-Python: >=3.9
Description-Content-Type: text/markdown

# cerberus-core

Shared utilities for the [Cerberus](https://github.com/gpotrock/cerberus) monitoring ecosystem.

This package provides common sanitization logic and sensitive key definitions used by:
- [cerberus-django](https://pypi.org/project/cerberus-django/) — Django middleware
- [cerberus-mcp](https://pypi.org/project/cerberus-mcp/) — MCP server instrumentation

## Installation

```bash
pip install cerberus-core
```

You typically don't need to install this directly — it's pulled in automatically as a dependency of `cerberus-django` or `cerberus-mcp`.

## Usage

```python
from cerberus_core import sanitize_dict, SENSITIVE_KEYS, REDACTED

data = {"username": "alice", "password": "hunter2", "nested": {"token": "abc"}}
clean = sanitize_dict(data)
# {"username": "alice", "password": "[REDACTED]", "nested": {"token": "[REDACTED]"}}
```

## What's Included

- **`SENSITIVE_KEYS`** — Unified set of key names whose values should be redacted (passwords, tokens, API keys, PII identifiers, etc.)
- **`SENSITIVE_HEADERS`** — HTTP headers that should always be redacted
- **`REDACTED`** — The sentinel string `[REDACTED]`
- **`sanitize_dict(data)`** — Recursively redacts sensitive keys in dicts and lists
