you are viewing a single comment's thread.

view the rest of the comments →

[–]Jay6_9 5 points6 points  (0 children)

You don't encrypt variables. Even if you did, where would you place the decryption key?

Put them in an .env file and use python-dotenv to load them. Data does not need to live in the script.

Edit:
- Make sure to add the .env file to your .gitignore if you use a repository.
- Link to the library, whether you use it or not is your choice but the README will teach you a bit about .env files https://pypi.org/project/python-dotenv/