Secret(s) Guide @ Coding:
Store project secrets safely with a .env and the dotenv library. Follow the guide below:
Example Python Code to get your Token from an .env File:
Never put your .env in your Git Repo. Here is how to avoid it:
- Create an
.gitignore(Critcal Step otherwise your secrets will be revealed!) - Add
.envto the file. - Commit it.
- Add your tokens to your
.envafter the commit.
Tip
IndiSpark has a variety of FREE code examples. One Example is on how to use this system. Click Here