0

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.

Community
  • 1
  • 1
Ender Dangered
  • 103
  • 1
  • 8

1 Answers1

1

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)

see here an example

  • thanks for your answer, but can the file be read by other users? i know its a .env, but couldn't it just be opened by the other users? – Ender Dangered Aug 31 '23 at 08:52