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 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.
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?
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!
I really like the Repl DB. My only issue is key size limits.
Also, please add the ability to view the Database!
Doesn't update when I call set() and it wipes the data once the program exits!
What kind of db is it if it cant even persist data.
now using a json file as a db is the quickest and simplest option
I have a 2 questions and feedback
1)Is there a way to update a key's value in the database?
2)I noticed that the storage for a key's value is only 100B could you please increase that?
One feature I'd love to see is multiple databases- I really need an alternative to json and instead of having multiple json files, maybe we can have different variables for databases. Maybe something like:
from replit import db
db1 = db()
db2 = db()
I haven't done anything too complex with it, but I want to know how many key-value pairs I can store. I want to store a lot of key-value pairs, so I will be needing that extra space.
Hello! Author of a couple database wrappers here. Got a few little things I'd love to be added to this database system.
- count() or size() method to give us a number of entries recorded (without having to get db.list())
- clear() or deleteAll() to remove all entries (perhaps with an optional prefix support)
And perhaps, as a future development option, the possibility to store json instead of just strings? Obviously a larger change than my other 2 suggestions, and I can't pretend to know how this DB is implemented in the back-end, but doing something like what the
I think you should be able to look at and manipulate keys without code so if you accidentally make keys you don't need you can delete them worrying about forgetting what the keys name was.
my code is this
from replit import db db["person"] =  while True: olo=input("you wanna create a new username(c) or you wanna use a existing(e) username, or see the usernames?(u)") if olo=="c": db["mainkr"]=input("enter a new username: ") db["mainkr"].append(db["person"]) print(db["person"]) print("added") elif olo=="u": print(db["person"]) else: exts=input('enter a existing username: ') if exts in olaxd: print("received") print(db["mainkr"]) else: print(db["person"])
but i dont know why fix the wrong:
'str' object has no attribute 'append'
how i ca fix this, thanks