编写.env文件的库
pydotenv的Python项目详细描述
安装
pip install pydotenv
用法
env = pydotenv.Environment() env['MY_VARIABLE'] = 'some-value' Check if file exists: pass `check_file_exists=True` to get an exception if the file does not exist. By default(`False`) the file is created.