From 4f0860180ca208f064ed12bee635aa0d96449026 Mon Sep 17 00:00:00 2001 From: Dominik Krenn Date: Tue, 1 Jul 2025 09:48:35 +0200 Subject: [PATCH] docs: update README.md to enhance environment loader description and use cases --- README.md | 25 +++++++++++++++++++++++-- 1 file changed, 23 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 14aae02..1bc09d2 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,24 @@ -# multinut +# multinut -The multitool nobody asked for. Includes stuff like `greet()`, `add()`, and other functions you'll forget are here. +The multitool nobody asked for. Includes stuff and so + +--- + +## `multinut.env` + +A simple but flexible environment loader. +Supports `.env` file parsing with optional mode suffixes (e.g. `.env.production`, `.env.testing`, etc.), lazy loading, and dynamic access. + +Useful when: + +* You want a single class that can load environment configs based on mode (`development`, `production`, etc.) +* You need access via `env["KEY"]`, `env.get("KEY")`, or even `env.KEY` +* You want optional type casting and sane default handling +* You *don’t* want `os.environ` to be touched + +### Use cases + +* Loading `.env` files in mode-aware Python projects +* Separating secrets and configs by deployment context +* Dynamically reading values like `env.DB_URL`, `env.get("DEBUG", default=False, cast=bool)` +* Avoiding external dependencies beyond `python-dotenv`