Ask coding questions

← Back to all posts
Hiding a json file

i have a json file that i dont want anyone to see, how would i do that
EDIT 1: its the firebase admin sdk json file for python


If you're using a programming language that supports it on replit (example: Python), you can use replit db to store the raw json string as a dictionary. No one can see it unless you print it out to the console, or something like that.


Try encryption. You can encrypt the JSON file then store in the new repl feature SECRET KEYS. Then when you're ready get it out of the key and decrypt it.


You can minify the JSON down to a single line, put that into a .env file, then in your code, get it from there, parse the JSON and voilá you can use it in your code
Working python repl:


You might want to take a look at this:


You will not like this, but I guess your only way to do it would be upgrading your account to 'Hacker'.
Unless you do that your repls are public.


I think the only way to hide a file in repl is either to upgrade to hacker, or rename the file ".env"


Click the check mark next to my comment if this helped! @snekattack


If you're using windows, you can hide a file by going into the properties (which is found by right clicking the file) of the file and clicking on the tick-box "Hidden".


@EuanTH im talking abount in replit