#Can only be imported on main.py import yaml username: str = None password: str = None auth_secret_file_location = './secrets/auth.yaml' def load_username_password_from_secrets(): global username global password with open(auth_secret_file_location, 'r') as auth_file: auth_object = yaml.safe_load(auth_file) username = auth_object['username'] password = auth_object['password'] def get_username_password(): return username, password load_username_password_from_secrets()