A libray to write .env files
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.
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.