I have a working python script that I compile into an exe with pyinstaller.
The script makes a database connection and in my dev setup, I am passing the database connection parameters (username, password) in the connection string.
The exe will end up running on another users PC and, while I think it unlikely, I do not want them to have the ability to extract the database password from any of my code.
I was hoping to create a DSN in the Windows ODBC Data Source Administrator on the production PC and only pass the DSN parameter in my python code. However, I have been unsuccessful in getting this to work. In my searching, all the example I see using a DSN also have a password assigned in the pyodb connection string. So is what I want to do even possible?
The script makes a database connection and in my dev setup, I am passing the database connection parameters (username, password) in the connection string.
The exe will end up running on another users PC and, while I think it unlikely, I do not want them to have the ability to extract the database password from any of my code.
I was hoping to create a DSN in the Windows ODBC Data Source Administrator on the production PC and only pass the DSN parameter in my python code. However, I have been unsuccessful in getting this to work. In my searching, all the example I see using a DSN also have a password assigned in the pyodb connection string. So is what I want to do even possible?