Ask coding questions

← Back to all posts
How to hide secret keys in a toml file?
JeanBaptisteRig (0)

This does not work with "os" provided by replit.

Comments
hotnewtop
VulcanWM (2759)

Click the padlock on the left hand side of the repl page, left to where the code is.
Enter the key of the secret in the key input and then the secret itself in the TOKEN input.
To get the secret, do:
import os
token = os.getenv(“key”)