How do you use auto-py-to-exe
's -onefile and add a .env
?
I'm programming a python app that has API Key and I'm wondering how you can add a .env
file to auto-py-to-exe
.
You need to use the --add-data
or "Additional files" feature in auto-py-to-exe
and add a file to the root directory which you can do by adding a period (.
) to the file directory (the root directory is the directory, in which your py file is in the exe)
EDIT:
The user can not see the content neither of the python file nor of the env file, because this is then an exe file, and you can not convert exe files back to their original format. You could also inplement the API Key in the python file, the user isn't able to get the Key out of the exe file