import tempfile


def setup_environment(content: str):
    """Initialize a config file and return its path"""
    cfg_f = tempfile.NamedTemporaryFile()
    cfg_f.write(content.encode())
    cfg_f.seek(0)

    return cfg_f.name