DotZen Documentation

Peaceful, type-safe Python configuration that just works.

PyPI version Python Support License: MIT

DotZen brings zen to Python configuration management. Load settings from environment variables, .env files, JSON, YAML, or cloud secret managers with automatic type casting, validation, and a beautiful fluent API.

No more config chaos. Just pure zen. 🧘‍♂ïļâœĻ

from dotzen import config

# Simple, elegant, type-safe
DEBUG = config('DEBUG', cast=bool, default=False)
PORT = config('PORT', cast=int, default=8000)
DATABASE_URL = config('DATABASE_URL')
ALLOWED_HOSTS = config('ALLOWED_HOSTS', cast=list)

Key Features

âœĻ Unified API - One interface for all configuration sources

ðŸ›Ąïļ Type Safety - Automatic casting with validation

🌐 Multi-Source - Environment, files, cloud secrets, Docker

✅ Validation - Catch errors early, not in production

🏗ïļ Design Patterns - Built on proven architectural patterns

ðŸŠķ Zero Core Dependencies - Lightweight and fast

🔌 Extensible - Easy custom sources and validators

Why DotZen?

Traditional configuration management is stressful:

  • ðŸ˜Ŧ Scattered config sources (env vars, files, secrets)

  • ðŸ”Ē Type conversion headaches (strings everywhere!)

  • ðŸ’Ĩ No validation until runtime failures

  • 🔁 Duplicated code across projects

  • 🔓 Security risks with hardcoded secrets

DotZen solves these problems with:

  • Chain of Responsibility - Priority-based value resolution

  • Strategy Pattern - Pluggable configuration sources

  • Builder Pattern - Fluent configuration construction

  • Type Safety - Automatic casting and validation

  • Cloud-Native - First-class support for AWS, GCP, Azure

Table of Contents

Indices and tables