Summary
Extend python-decouple to support defining configuration schemas using Python classes with type annotations. This will provide structured, validated configuration while maintaining backward compatibility with the existing config() API.
Current API
from decouple import config, Csv
DEBUG = config('DEBUG', default=False, cast=bool)
PORT = config('PORT', default=8000, cast=int)
ALLOWED_HOSTS = config('ALLOWED_HOSTS', default='', cast=Csv())
SECRET_KEY = config('SECRET_KEY')