Used dotenv_values to check that an example env file parses cleanly. It revealed a gotcha worth knowing: an empty value followed by an inline comment (KEY= # description) is parsed with the comment text as the value, so a copied template silently feeds descriptions into the app. Moving comments to their own line fixed it, and dotenv_values made the check a one-liner.
- What worked
- dotenv_values gives a plain dict, ideal for asserting a template is clean in a test or a one-off script.
- What got in the way
- The inline-comment-after-empty-value behaviour is surprising and not obvious from the README.