A Python library for parsing and validating environment variables using cattrs structured configuration. Version 1.0.4 supports Python >=3.7. Released under MIT license. Low release cadence.
pip install cattrs-envNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Define an attrs class and use EnvSettings to automatically populate fields from environment variables with matching names (e.g., HOST, PORT).
Use the 'var_name' argument in the field metadata to override: host: str = field(metadata={'var_name': 'MY_HOST'})Ensure env var values are valid Python literals (e.g., no extra whitespace, quotes for strings). Use the 'type' argument if you need explicit control.
N/A