Oct-20-2022, 07:22 PM
What I did is this, not sure if this is the best solution.
I created another python file called sql_creds.py, then I copy and pasted username and password there.
Then on my main.py, I imported sql_creds.py as creds. Then I used creds.username, and creds.password.
But this doesn't the solve the problem either because now someone can open sql_creds.py to get the login. I can probably hide that file, but that's not a solution either.
How do you hide API, passwords etc on your code?
I created another python file called sql_creds.py, then I copy and pasted username and password there.
Then on my main.py, I imported sql_creds.py as creds. Then I used creds.username, and creds.password.
But this doesn't the solve the problem either because now someone can open sql_creds.py to get the login. I can probably hide that file, but that's not a solution either.
How do you hide API, passwords etc on your code?