Ask coding questions

← Back to all posts
How to hide database from user
h
Coder2195Text (35)

I'm making a little sign in thingy, but in the future this data that is in a env file is going to expand and I MIGHT need it to work on a database instead. How do I hide a .db file from users in repl it

Comments
hotnewtop
Coder100 (16789)

I recommend use replit db: https://docs.replit.com/misc/database

ALSO WHY IN THE WORLD ARE YOU USING .ENV TO STORE DATA
1. it won't work
2. .env is meant to store secrets (like tokens, database keys, etc.), they are NOT meant to store code or anything like that.

Coder2195Text (35)

@Coder100 does the database support lists inside keys

Coder100 (16789)

maybe you should actually try it out first
https://tryitands.ee @Coder2195Text

SixBeeps (5037)

@Coder2195Text

does the database support lists inside keys

If it didn't, there's this thing called JSON that would let you do it otherwise.

Coder2195Text (35)

@Coder100 Hey the entire point is to have other users access it but not see it since this is a virtual computer for everyone

IcynDevz (725)

The database is not in a file.

I think.
Coder2195Text (35)

@IcingHackz .db? im using sqlite3 in python

IcynDevz (725)

@Coder2195Text what nvm, I thought you were talking about normal python.

Coder2195Text (35)

@IcingHackz YEAH I did import sqlite3 then connected it to a .db file

IcynDevz (725)

@Coder2195Text but I don't know how to hide a .db file...