I am working on a project where i am accessing an API. I have a python file that has variables to the API key and secret. I want to commit it to GitHub without having those variables filled out. What would be the best way to do it without having to remove the key each time? Let me know if i need to clarify anything. Thanks in advance.
Asked
Active
Viewed 132 times
0
-
Use environment variables and access them with `os.environ.get('your var')` – go2nirvana May 05 '21 at 14:52
-
You could add it to the `.gitignore` and add an example file without the credentials. – dan1st May 05 '21 at 14:52
-
Thank you both. I will try those things. – Kyle Hardinge May 05 '21 at 14:56