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.
You should use a .env file. Here is a tutorial on that: https://repl.it/talk/learn/Save-Data-Using-JsonStoreio/16095#storing-your-endpoint-in-an-environment-variable
@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)