Metadata-Version: 2.4
Name: pycacheopt
Version: 0.2.6
Summary: Performance-oriented cache optimization utilities for Python applications
Author-email: Viktor Lebedev <v.lebedev@proton.me>
License: MIT
Project-URL: Homepage, https://github.com/pycacheopt/pycacheopt
Project-URL: Repository, https://github.com/pycacheopt/pycacheopt
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Software Development :: Libraries
Requires-Python: >=3.10
Description-Content-Type: text/markdown

# pycacheopt

Performance-oriented cache optimization utilities for Python applications.

Provides fast cache key derivation, namespace-isolated key prefixes, and
lightweight health-check primitives for high-throughput Django / FastAPI services.

## Installation

```bash
pip install pycacheopt
```

## Usage

### Key derivation

```python
from pycacheopt import optimize

derived = optimize("user:1234", salt="myapp", iterations=2)
# -> 'a3f2b9...'
```

### Deterministic key hashing

```python
from pycacheopt import key_hash

key = key_hash("tenant", 42, "active")
# -> 'e7dc1f...'
```

### Versioned prefixes

```python
from pycacheopt import key_prefix

prefix = key_prefix("sessions", version=3)
# -> 'pycacheopt:sessions:v3:'
```

### Health check

```python
from pycacheopt import health_check

status = health_check()
# -> 'healthy'

info = health_check(detailed=True)
# -> {'status': 'healthy', 'latency_ms': 0.012, 'pid': 1234, 'backend': 'pycacheopt-cext'}
```

## License

MIT
