How do I hide info or a file from the user
I have a json file with an api key and I don't want people to be able to see it but I still want to put it on repl.it.
Answered by Vandesm14 [earned 5 cycles]
@Foster_Bryant Refer to this
You should create a
.env file with the following:
And you can reference the key by doing:
import os # Set apikey to the APIKEY in the environment variables apikey = os.environ["APIKEY"] # Print the key to check is works print(apikey)