Load environment variables from a .env file.
| PARAMETER |
DESCRIPTION |
path
|
Path to .env file. If None, searches current directory and parents.
TYPE:
Optional[str]
DEFAULT:
None
|
| RETURNS |
DESCRIPTION |
Dict[str, str]
|
Dictionary of environment variables that were loaded.
|
Example
from mini_control_arena import load_env
# Load from .env in current or parent directories
load_env()
# Load from specific file
load_env(".env.local")