<gh_stars>0
import json
import os
from typing import Dict

from dotenv import load_dotenv


def load_config() -> "Dict[str, Dict[str, str]]":
    """
    # .env
    TESTS_LOGIN='{"base_url": "", "username": "", "password": ""}'
    """
    config: "Dict[str, Dict[str, str]]" = {}
    for variable in ["login"]:
        environ_variable = f"TESTS_{variable.upper()}"
        if environ_variable in os.environ:
            config[variable] = json.loads(os.environ[environ_variable])
    return config


load_dotenv()
config = load_config()
