"""askemblaex/env.pyEnvironment variable loading via python-dotenv."""from__future__importannotationsfrompathlibimportPathfromdotenvimportload_dotenv
[docs]defload_env(env_file:Path|None=None)->None:""" Load environment variables from a ``.env`` file. Called at module import time by most askemblaex modules so that credentials are available before any service clients are initialised. Args: env_file: Path to the ``.env`` file to load. Defaults to ``.env`` in the current working directory. A missing file is silently ignored. """ifenv_fileisNone:env_file=Path(".env")ifenv_file.exists():load_dotenv(env_file)