Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -162,8 +162,6 @@ The SDK and CLI read credentials from environment variables such as
`IMEDNET_API_KEY` and `IMEDNET_SECURITY_KEY`. You can set these in your shell or
use a `.env` file. Copy `.env.example` to `.env` to get started.

> **Note**: `imednet.load_config()` only reads from existing environment variables (`os.getenv`). While the CLI automatically loads `.env` files, standalone Python scripts must explicitly call `load_dotenv()` from the `python-dotenv` package to read from a `.env` file before calling `load_config()`.

See [configuration](docs/configuration.rst) for the complete list of options.
Use `imednet.config.load_config()` to access these values in your code.

Expand Down
3 changes: 3 additions & 0 deletions examples/async_quick_start.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@ async def main() -> None:
configure_json_logging()
load_dotenv()

# Load environment variables from .env file if it exists
load_dotenv()

try:
cfg = load_config()
except ValueError as e:
Expand Down
3 changes: 3 additions & 0 deletions examples/quick_start.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@ def main() -> None:
configure_json_logging()
load_dotenv()

# Load environment variables from .env file if it exists
load_dotenv()

try:
cfg = load_config()
except ValueError as e:
Expand Down
Loading