Ask coding questions

← Back to all posts
Hiding a json file
[deleted]

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

Comments
hotnewtop
Andy_4sberg (50)

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.

robowolf (435)

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.

19ecal (228)

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:
https://replit.com/@19ecal/PopularShadowyPhase#main.py

m4rus3ru (15)

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.

LukeWright (114)

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

LukeWright (114)

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

EuanTH (4)

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".

[deleted]

@EuanTH im talking abount in replit