Skip to content

Add schema-based configuration with type validation #183

@Ayaz72472

Description

@Ayaz72472

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')

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions