How do I hide the usernames file?
So I just added this JSON saving system, and I dont know how to make the usernames file invisible. I dont want people to be able to overwrite others saves, so how can I hide the file?
To make the JSON into a string use this python command:
). Then, store that string into a variable, and write that into a .env file. Also, I found this on github: https://gist.github.com/kr/6161118. Another thing that is helpful, is if you need to get the .env variable, then just use:
secret_token = os.getenv("TOKEN"). Remember, refer to https://docs.replit.com/repls/secret-keys for extra information, because I may have not listed everything!
You're welcome if I solved your question!
@pieninja We cant access your database. Any keys made would be saved to our database. If you want a database containing all users, encryption outside of secret variables is easier because it makes it harder for people to read your code but it is still usable. Pickle is also a good option.