Skip to content
← Back to Community
Repl.it Database feedback 💾
Profile icon
h
has Hacker Plan
kochman

Hey replers! We’re beginning to roll out Repl.it Database. We’d love to get your feedback on it so that we can continue making it better.

What is Database?

Database is an easy-to-use key-value store. You can store data in it and retrieve data from it, even after your repl restarts. It's great for building website or game backends, Discord bots, or any other type of app that needs to store some information.

Check out the repl in this post to see how easy it is to use. You can also take a look at the documentation here: https://docs.repl.it/misc/database

How do I use it?

If Database has been rolled out to you, you can look at some examples by opening up a repl and clicking on the Database icon toward the bottom of the sidebar. Database just works inside your repls, without any configuration.

What languages does it support?

We’re providing official clients for Python, Node.js, and Go. But Database is simple enough that you can use it from an HTTP client in any language.

We want to hear from you!

If there’s anything you’d like to see us change or add to Database, please leave a comment below. Thank you for your help!

If you don't have Database in your repls yet, please check back soon! We're rolling it out as you read this.

Voters
Profile icon
anoukuser
Profile icon
AzoozAl-anzi
Profile icon
FATIMAABDULLA28
Profile icon
Chusk
Profile icon
PC2Server
Profile icon
SamMarch
Profile icon
Owuor0733
Profile icon
LESTAR11
Profile icon
G0RG3
Profile icon
offwiter
Comments
hotnewtop
Profile icon
Technical13

First, please add a way to see all keys in the DB without needing to search for a specific prefix. Second, please add more languages - PHP would be great because it's a huge pain to work with currently. I can only seem to add/get/remove from the shell window and not in my code.

Profile icon
OneNose

Please add the option to view your data base. It's really annoying.

Profile icon
linksafe

You can do so by running $REPLIT_DB_URL in your Shell. @OneNose

Profile icon
Sept1c

@linksafe that just leads me to a blank page

Profile icon
linksafe

If you tried to access your database via its URL, it'll just return a blank webpage. Use an unofficial database viewer like https://replit.com/@rbinfinity/Replit-Database-Admin-Console. @Sept1c

Profile icon
PYer

Nice an simple! I'm going to keep using MongoDB for certain applications, as I definitely like the structure. This is nice though!

Profile icon
aGEEKdude

I like this! However, when I click on the link that it provides so that I can see all of the keys, it takes me to a blank page with no content.

Profile icon
ssura

@DSASimon This happens to me too! But when I check the database it says the number of items. But I can't physically see things when I click that link. :(

Profile icon
Sept1c

@aGEEKdude damn they still didnt fix this

Profile icon
PouriaMoradpour

the main idea is great but it has only a few features.
also from yesterday, I'm getting a key error whenever I try to access a certain value that exists in db.keys
() list .

Profile icon
potatojs

i finely tried it and it is very cool!
but the only suggestion is to add the ability to view/edit the data base from a certain page
something like mongoDB atlas were you can delete document edit them anytime wich could be very helpful while developing!
:)

Profile icon
HarperframeInc

I really like the Repl DB. My only issue is key size limits.
Also, please add the ability to view the Database!

Profile icon
kochman

@HarperframeInc We're open to increasing the limits! We set them conservatively to start with. What would you like to see?

Profile icon
HarperframeInc

Let the owner view all the keys in the database, maybe search for keys?

Profile icon
triptych

@HarperframeInc you could potentially get around this by spinning up a few more repls and shard your data.

Profile icon
HarperframeInc

@triptych No- doing this is insecure, and but sharding- possibly.

Profile icon
bigboyyyyyyyy69

How should I go about doing a more advanced keys retrieve for my discord economy bot...

somthing like

if key does not exist:
do something

Profile icon
ruiwenge2

@bigboyyyyyyyy69 like this:

if key not in db.keys(): # do something here
Profile icon
bigboyyyyyyyy69

@ruiwenge2 thanks :D I've gotten slightly better with using the db

Profile icon
linksafe

Or,

if key not in db: #do something here

@ruiwenge2

Profile icon
blbbrayan

I can never get this to work properly in node js. Extremely buggy. Which is sad.

Profile icon
McLigma

Bricked my repository twice because you can't delete keys with certain special characters in them (At least ? and /)

Profile icon
KokoPolis

Can you add export / import ?

Profile icon
rayne14

the db keeps resetting on its own and i lost everything i saved. why does it keep happening? there isn't even a way to just view and backup my data so it's horrible when it happens every couple of weeks or so

Profile icon
Jeffplays2005

@rayne14 Have the same problems😭

Profile icon
LeCodex

My database got partially wiped just now. I am migrating to another service since the unreliability of this one defeats the whole purpose of a database.

Profile icon
rayne14

@LeCodex my db keeps getting fully wiped every few weeks. It's super annoying especially when there's no backup or versioning at all

Profile icon
triptych

I love it! Some questions / requests

  1. how do I keep the database from being wiped between runs?
    For example: https://repl.it/@triptych/IroncladAshamedRobot#index.js
  2. need a way to upload / download the database data - like say to/from a json file?
  3. when I download the repl to a zip, would be great to get a copy of the database too!
  4. do you have any examples of a simple node.js based app using this?
Profile icon
silverwolfceh

@triptych I have the same issue that the database sometimes being wiped. If you find a solution, please kindly share with me. Thanks

Profile icon
JosephMaxwell

@triptych Here's a simple Node/Express app I built with the Repl db: https://repl.it/@JosephMaxwell/NodeJsToDoList

Definitely not the cleanest, but it does work and has a front-end and back-end. I haven't noticed my db getting wiped at all, but I've only been working with it for a few hours.

Profile icon
triptych

@JosephMaxwell Thank you for this! For some reason I though that when the Repl runs a second time that new database call ( const db = new database(); ) would clobber the old database but it seems to be smart enough to persist the database!

Profile icon
LoweLembrin

give money i use repl.it and u guys dont give money my school force everyone to use repl.it so u should give money to my school too thanks. if no give i will sue you!

Profile icon
Gusten-Emil-Lindgren

@LoweLembrin
yos them ned to gib mony or i not get mony

Profile icon
Manoeuvres

Hello, i have used the replit database and think it's a great idea but I tried to store a item stopped the program and ran it again and my item was not there more time should be put into this to make it work.

Profile icon
Topscientist

Hi, I am coding in discord.py and am grabbing the discord servers id and storing it in the database in order to store config settings, however when I go to delete the key it brings up this error: TypeError: quote_from_bytes() expected bytes anyone got a fix for this?

Profile icon
Brakko

@Topscientist discord servers id (and any discord id) are int, and the db keys should be str, try making a key using db[str(id)] = val.

Profile icon
Topscientist

@Brakko Ah Oki, Thanks

Profile icon
PookieYeboi

@Brakko Thanks helped me out was slightly confused

Profile icon
TnhodepressoDin

por que o repl.it demora de carregar tem vezes que nem carrega pra mim editar meu bot ;(

Profile icon
VivaanSa

yay!

Profile icon
EpicGamer007

How do you get your client to be "official" or something, like IreTheKid and CodeMonkey got their python client on the repl.it docs.

Profile icon
potatojs

wait can the free plan users also use the repl database?

AWESOME!!

Profile icon
kochman

@potatojs Yes, it will be available to everyone, not only hackers.

Profile icon
potatojs

NICE
this is very cool
@kochman

Profile icon
adl212

Awesome! Isn't there another module for replitdb in python though?

Profile icon
Duvangamer3845

@adl212 replit

Profile icon
adl212

@Duvangamer3845 Yeah, that's what I thought.

Profile icon
zplusfour

wow thanks!

Profile icon
NutesCoding

c++ support pls

Profile icon
geox25

Please add an official client for Java, it would be very helpful. (And also other popular languages)

Profile icon
dexsama

Warning: REPLIT_DB_URL does not exist, are we running on repl.it? Database will not function.
Traceback (most recent call last):
File "main.py", line 4, in
db["hello"] = "🌍"
TypeError: 'NoneType' object does not support item assignment

Profile icon
dexsama

Fix this please!

Profile icon
horizonlucius

why some repl, file REPLIT_DB_URL is undefined ??? how i can resolve it ?

Profile icon
QuangSon1
Profile icon
blockowo

would be nice to have some form of security. like preventing deleting and such.

Profile icon
AlirezaBagheri2

1LfV1tSt3KNyHpFJnAzrqsLFdeD2EvU1MK